IwnfuM Posted September 5, 2010 Share Posted September 5, 2010 hi , i want to pull out the last rows that got inserted into my table. thanks , Mor. Link to comment https://forums.phpfreaks.com/topic/212593-last-10/ Share on other sites More sharing options...
Pikachu2000 Posted September 5, 2010 Share Posted September 5, 2010 Assuming you have an auto-increment index key named `id`, in a table named `table`. The rest should be obvious . . . "SELECT `field_1`, `field_2`, `field_3`, `etc` FROM `table` ORDER BY `id` DESC LIMIT 10" Link to comment https://forums.phpfreaks.com/topic/212593-last-10/#findComment-1107488 Share on other sites More sharing options...
IwnfuM Posted September 5, 2010 Author Share Posted September 5, 2010 thanks , Mor. Link to comment https://forums.phpfreaks.com/topic/212593-last-10/#findComment-1107512 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.