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? Quote 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. Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.