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. Quote 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" Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/212593-last-10/#findComment-1107512 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.