dadamssg Posted June 26, 2009 Share Posted June 26, 2009 How would i query my database for the latest entry for a user? my database contains comments. I want to pull up the latest comment for the a user. Do i use a limit? order desc? Link to comment https://forums.phpfreaks.com/topic/163722-solved-pull-up-last-entry/ Share on other sites More sharing options...
Ken2k7 Posted June 26, 2009 Share Posted June 26, 2009 SELECT colums FROM table WHERE userid = 1 ORDER BY timestamp DESC LIMIT 1; Something like that. Link to comment https://forums.phpfreaks.com/topic/163722-solved-pull-up-last-entry/#findComment-863881 Share on other sites More sharing options...
dadamssg Posted June 26, 2009 Author Share Posted June 26, 2009 thanks for the quick response, SOLVED Link to comment https://forums.phpfreaks.com/topic/163722-solved-pull-up-last-entry/#findComment-863896 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.