Wednesday, June 17, 2009

How to get last row from database table?



It is easy to find last row from table. The below query can be used to get last row from table.

$sql="select * from <table name> order by <field name> desc limit 1"

It displays one last row from table.


More Articles...

No comments:



Thanks for visiting our blog


twitterrss facebook linkedin YouTube subscribe


Subscribe via email

Enter your email address: