<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — Last Id]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=8026</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=8026&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Last Id.]]></description>
		<lastBuildDate>Thu, 17 Mar 2022 05:23:49 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Last Id]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44193#p44193</link>
			<description><![CDATA[<p>Sorry. I really can&#039;t picture it out to what you really want to do. <br />I want to help but I need the exact and detailed process.</p>]]></description>
			<author><![CDATA[null@example.com (brian.zaballa)]]></author>
			<pubDate>Thu, 17 Mar 2022 05:23:49 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44193#p44193</guid>
		</item>
		<item>
			<title><![CDATA[Re: Last Id]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44183#p44183</link>
			<description><![CDATA[<p>Hi brain,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Look at attached pic and see what I want to do. This is from income_expenses project</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Wed, 16 Mar 2022 09:54:47 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44183#p44183</guid>
		</item>
		<item>
			<title><![CDATA[Re: Last Id]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44153#p44153</link>
			<description><![CDATA[<div class="quotebox"><cite>unforgettable wrote:</cite><blockquote><p>Can we use it in conditional statement if....then?<br />How we use ( select MAX(id) from xyz) in conditional statement? for example<br />if (select MAX(id) from xyz = (select id_abc from xyz where id_abc = 5) then ......</p></blockquote></div><p>I&#039;m a bit confused to what you really want with if condition.</p><p>Is it If-else condition in script or in sql? <br />Then, can you elaborate to what extend you are going to use it. <br />Can you at least tell us the logic to why you want the if-else? <br />Try not to include sql query first and just elaborate the logic or problem.</p>]]></description>
			<author><![CDATA[null@example.com (brian.zaballa)]]></author>
			<pubDate>Mon, 14 Mar 2022 03:08:12 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44153#p44153</guid>
		</item>
		<item>
			<title><![CDATA[Re: Last Id]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44152#p44152</link>
			<description><![CDATA[<p>Can we use it in conditional statement if....then?<br />How we use ( select MAX(id) from xyz) in conditional statement? for example<br />if (select MAX(id) from xyz = (select id_abc from xyz where id_abc = 5) then ......</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Mon, 14 Mar 2022 02:47:33 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44152#p44152</guid>
		</item>
		<item>
			<title><![CDATA[Re: Last Id]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44133#p44133</link>
			<description><![CDATA[<div class="quotebox"><cite>unforgettable wrote:</cite><blockquote><p>Thank you brain. In this query LIMIT 1 means one step before and other 1 is an increment.</p></blockquote></div><p>Limit is the number or record you want to fetch.</p><p>1.<strong> Limit 1</strong>, will be selecting the first record of the query<br />2. For <strong>Limit 1, 1</strong>, First 1 will be the offset(will skip 1 record), then the Next 1 will be the number of record you are selecting<br />3. For <strong>Limit 2, 1</strong>, This will skip 2 record, then select 1 record from the query</p>]]></description>
			<author><![CDATA[null@example.com (brian.zaballa)]]></author>
			<pubDate>Sat, 12 Mar 2022 14:37:30 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44133#p44133</guid>
		</item>
		<item>
			<title><![CDATA[Re: Last Id]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44126#p44126</link>
			<description><![CDATA[<p>Thank you brain. In this query LIMIT 1 means one step before and other 1 is an increment.</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Sat, 12 Mar 2022 01:38:47 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44126#p44126</guid>
		</item>
		<item>
			<title><![CDATA[Re: Last Id]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44124#p44124</link>
			<description><![CDATA[<p>Hello unforgettable, StateOne:</p><p>I&#039;m confused. are you just trying to access the last record of your table? If so then you can just do<br /></p><div class="codebox"><pre><code>Select  * from xyz ORDER BY id DESC LIMIT 1</code></pre></div><p>In this way you don&#039;t have to include subquery. You don&#039;t want it to slow down your query especially for a well-populated table<br />Then for e.g. last id is 300, being no gap in the IDs, to access 299, <br /></p><div class="codebox"><pre><code>Select  * from xyz ORDER BY id DESC LIMIT 1, 1</code></pre></div><p>for 298<br /></p><div class="codebox"><pre><code>Select  * from xyz ORDER BY id DESC LIMIT 2, 1</code></pre></div><p>for 297<br /></p><div class="codebox"><pre><code>Select  * from xyz ORDER BY id DESC LIMIT 3, 1</code></pre></div><p>and so on.</p><p>For the conditional, try elaborating further the result you want to obtain for us to look for a solution.</p>]]></description>
			<author><![CDATA[null@example.com (brian.zaballa)]]></author>
			<pubDate>Fri, 11 Mar 2022 22:04:43 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44124#p44124</guid>
		</item>
		<item>
			<title><![CDATA[Re: Last Id]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44118#p44118</link>
			<description><![CDATA[<p>Thank you StateOne. Can you tell if I want to take one or more before max(id)? for Example if max(id) is 300 but I want to take 299 or 298 then I must type max(id-1)?.<br />Secondly I want to know how can I use this id in conditional statement? if.....then</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Fri, 11 Mar 2022 11:30:59 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44118#p44118</guid>
		</item>
		<item>
			<title><![CDATA[Re: Last Id]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44110#p44110</link>
			<description><![CDATA[<p>Select&nbsp; * from xyz where id = ( select max(id) from xyz)</p>]]></description>
			<author><![CDATA[null@example.com (StateOne)]]></author>
			<pubDate>Fri, 11 Mar 2022 03:44:03 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44110#p44110</guid>
		</item>
		<item>
			<title><![CDATA[Last Id]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=44109#p44109</link>
			<description><![CDATA[<p>Can any one tell how to use last id of a table for reference?<br />Select&nbsp; * from xyz where id = ( here must be last id of table)</p>]]></description>
			<author><![CDATA[null@example.com (unforgettable)]]></author>
			<pubDate>Fri, 11 Mar 2022 02:32:05 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=44109#p44109</guid>
		</item>
	</channel>
</rss>
