Lamez Posted January 7, 2009 Share Posted January 7, 2009 I have looked all over the internet, and all over the forums, and I cannot find what I am looking for. I am trying to take the last row out of the DB, or the max id. How would one go about this? -Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/139802-solved-last-row/ Share on other sites More sharing options...
newb Posted January 7, 2009 Share Posted January 7, 2009 SELECT * FROM db ORDER by column DESC LIMIT 1 Quote Link to comment https://forums.phpfreaks.com/topic/139802-solved-last-row/#findComment-731376 Share on other sites More sharing options...
Lamez Posted January 7, 2009 Author Share Posted January 7, 2009 lol, but that is not going to select the highest id, or the last row Quote Link to comment https://forums.phpfreaks.com/topic/139802-solved-last-row/#findComment-731377 Share on other sites More sharing options...
trq Posted January 7, 2009 Share Posted January 7, 2009 It will if column holds your id's. Quote Link to comment https://forums.phpfreaks.com/topic/139802-solved-last-row/#findComment-731379 Share on other sites More sharing options...
Lamez Posted January 7, 2009 Author Share Posted January 7, 2009 wait a minuet, that will work. Duh! Sorry its very late here, I need to hit the hay! Quote Link to comment https://forums.phpfreaks.com/topic/139802-solved-last-row/#findComment-731382 Share on other sites More sharing options...
newb Posted January 7, 2009 Share Posted January 7, 2009 Quote Link to comment https://forums.phpfreaks.com/topic/139802-solved-last-row/#findComment-731385 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.