I want to the select the very last record from my MySQL DB. How do I do
it?
Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com http://www.violasystems.com/
[EMAIL PROTECTED]
Mobile +358 50 343 5159
Hi Steve,
I want to the select the very last record from
my MySQL DB. How do I do it?
Depends what you mean by last. You can either do a select with an order
and a limit:
SELECT foo FROM bar ORDER BY timestamp DESC LIMIT 1
Or you can get the last primary key with PHP's mysql_insert_id()
2 matches
Mail list logo