kamal213 Posted July 21, 2011 Share Posted July 21, 2011 Hi guys, Is it possible to select only the lastest added item/entry added to your database. If so could you tell me how. Thanks alot Link to comment https://forums.phpfreaks.com/topic/242536-select-only-the-latest-item-from-mysql-database/ Share on other sites More sharing options...
Porl123 Posted July 21, 2011 Share Posted July 21, 2011 $sql = mysql_query("SELECT * FROM `table` ORDER BY `id` DESC LIMIT 1"); Btw, wrong section. ;o Link to comment https://forums.phpfreaks.com/topic/242536-select-only-the-latest-item-from-mysql-database/#findComment-1245585 Share on other sites More sharing options...
harristweed Posted July 21, 2011 Share Posted July 21, 2011 http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html Link to comment https://forums.phpfreaks.com/topic/242536-select-only-the-latest-item-from-mysql-database/#findComment-1245590 Share on other sites More sharing options...
kamal213 Posted July 21, 2011 Author Share Posted July 21, 2011 Lol! My Bad its coz I come here for help all the time thats y. Thanks for your help guys really appreciate! Link to comment https://forums.phpfreaks.com/topic/242536-select-only-the-latest-item-from-mysql-database/#findComment-1245654 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.