orevp Posted September 27, 2010 Share Posted September 27, 2010 Hi Guys. This is my problem: I want to get from my database the last 3 id columns and then present them separately in the page. I want to be able to tell my page to show the last id entered to the table someplace, and the one before that someplace else, and the one before that here and so on... I don't want a list, I want to be able to decide where the record is presented in my HTML design. What is the best way of doing this? Thank you for your help! Link to comment https://forums.phpfreaks.com/topic/214541-strategic-decision-regarding-php-and-mysql/ Share on other sites More sharing options...
Pikachu2000 Posted September 27, 2010 Share Posted September 27, 2010 SELECT `id` FROM `table` ORDER BY `id` DESC LIMIT 3 Store the result in an array, and just echo the elements where you need them. Link to comment https://forums.phpfreaks.com/topic/214541-strategic-decision-regarding-php-and-mysql/#findComment-1116385 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.