6 messages in com.mysql.lists.win32RE: get the last row
FromSent OnAttachments
Christian Bacher20 Mar 2002 11:02 
Rob Spijkerman20 Mar 2002 13:27 
Christian Bacher20 Mar 2002 14:35 
Christian Bacher20 Mar 2002 14:37 
tjaybelt20 Mar 2002 22:09 
Aaron West21 Mar 2002 08:55 
Subject:RE: get the last row
From:tjaybelt (tjay@yahoo.com)
Date:03/20/2002 10:09:54 PM
List:com.mysql.lists.win32

If you have a unique id, and the last one has the largest unique id, then order by ID desc will give you the last one on the top. Then do limit 1 and it'll give you the last record.

-----Original Message----- From: Rob Spijkerman [mailto:rob.@alliedtelesyn.co.nz] Sent: Wednesday, March 20, 2002 2:28 PM To: Christian Bacher; win@lists.mysql.com Subject: Re: get the last row

Hi Christian You can retrieve the ID by using the LAST_INSERT_ID() function in a query string that you pass to mysql_query().

Or look at ; http://www.mysql.com/doc/G/e/Getting_unique_ID.html

All the best

Rob

Date sent: Wed, 20 Mar 2002 20:02:58 +0100 From: Christian Bacher <cp@datacomm.ch> Subject: get the last row To: win@lists.mysql.com

hello, it seems, that this question is kind of trivial, but How do I get the last entry of a column (and only the last one) in a query. Is there a special synthax? Thx for any help. chris.

-------------------------------------------------------------