<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1003347" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1003347</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-and-mysql-getting-last-row-table#comment-1014690</link>
    <description> &lt;p&gt;As far as selecting the last row, why not make an id column: &lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;code:&lt;/p&gt;
&lt;pre&gt;id int not null auto_increment, primary key(id)[/code]

Anq use this to select:
 
&lt;BLOCKQUOTE&gt;code:&lt;pre&gt;select * from tablename order by id desc limit 1[/code]

That should select the last row of the table.

------------------
-Blur

[This message has been edited by Blur (edited 06 April 2000).] &lt;/pre&gt;&lt;/blockquote&gt;&lt;/pre&gt;&lt;/blockquote&gt;</description>
     <pubDate>Thu, 06 Apr 2000 19:24:00 +0000</pubDate>
 <dc:creator>Blur</dc:creator>
 <guid isPermaLink="false">comment 1014690 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-and-mysql-getting-last-row-table#comment-1014689</link>
    <description> &lt;p&gt;Hi Randall,&lt;/p&gt;
&lt;p&gt;I have been looking for the same thing - but, I have never found a command that will do it. I have just worked around it. It depends on what you need the last row for and what you plan to do with the information on the row.&lt;/p&gt;
&lt;p&gt;PHP does have a command that allows you to get the results of the last query that may help if you insert the last row right before needing to use it. Don&#039;t know if that will work or not.&lt;/p&gt;
&lt;p&gt;I really would like to know if there is some type of function, whether it be of mySQL or PHP, that will take care of this as well... If anyone has the secret, please share!&lt;/p&gt;
&lt;p&gt;------------------&lt;br /&gt;
TWF Administrator&lt;/p&gt;
&lt;p&gt;Looking for Web Hosting Services?&lt;br /&gt;
&lt;strong&gt;Dynamic Internet Solutions :  &lt;a href=&quot;http://www.dids.com&quot; class=&quot;bb-url&quot;&gt;http://www.dids.com&lt;/a&gt;&lt;br /&gt;
Windows NT and UNIX Hosting ($9.95 - $399.95), Dedicated Servers, and Co-Location Programs&lt;/strong&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 31 Mar 2000 05:39:00 +0000</pubDate>
 <dc:creator />
 <guid isPermaLink="false">comment 1014689 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
