6 messages in com.mysql.lists.win32RE: get the last row| From | Sent On | Attachments |
|---|---|---|
| Christian Bacher | 20 Mar 2002 11:02 | |
| Rob Spijkerman | 20 Mar 2002 13:27 | |
| Christian Bacher | 20 Mar 2002 14:35 | |
| Christian Bacher | 20 Mar 2002 14:37 | |
| tjaybelt | 20 Mar 2002 22:09 | |
| Aaron West | 21 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.
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail win3...@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail win3...@lists.mysql.com instead.
------------------------------------------------------------- Rob Spijkerman 27 Nazareth Avenue Database Developer PO Box 8011 Allied Telesyn Research Christchurch Phone +64 3 339 3000 New Zealand DDI +64 3 339 9569 Email: rob....@alliedtelesyn.co.nz Fax +64 3 339 3001 web: http://www.alliedtelesyn.co.nz/
-------------------------------------------------------------
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail win3...@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail win3...@lists.mysql.com instead.




