adi5402 Posted September 13, 2008 Share Posted September 13, 2008 I have a table with 500 products how do i pick up the last row I know you can order it by using this i can also get the number of rows using some code but is there a way we can just directly read the last entry $sql = 'SELECT * FROM `products` ORDER BY `products`.`book_Id` ASC LIMIT 0, 30 '; Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 13, 2008 Share Posted September 13, 2008 $sql = 'SELECT * FROM `products` ORDER BY `products`.`book_Id` DESC LIMIT 1'; Quote Link to comment Share on other sites More sharing options...
adi5402 Posted September 13, 2008 Author Share Posted September 13, 2008 cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.