supermerc Posted March 24, 2008 Share Posted March 24, 2008 hey, Im making a site sort of like facebook for a project and I want to display any comments posted on the users profile since its last login, but Im not sure on how I should do so. Could anyone point me in the right direction to do so? And im using sessions if that has any relevance. Thank you. Link to comment https://forums.phpfreaks.com/topic/97642-since-last-login/ Share on other sites More sharing options...
cooldude832 Posted March 24, 2008 Share Posted March 24, 2008 store login dates in the users tables store dates posted in the events tables #$_SESSION['LastLogin'] = The users last login $q = "Select Stuff from `events` where Date_Created >= '".$_SESSION['LastLogin']."'"; Link to comment https://forums.phpfreaks.com/topic/97642-since-last-login/#findComment-499592 Share on other sites More sharing options...
supermerc Posted March 24, 2008 Author Share Posted March 24, 2008 what format should i put the time? Link to comment https://forums.phpfreaks.com/topic/97642-since-last-login/#findComment-499616 Share on other sites More sharing options...
cooldude832 Posted March 24, 2008 Share Posted March 24, 2008 DateTime is the best format IMHO because it contains the a lot of data in 1 field. Link to comment https://forums.phpfreaks.com/topic/97642-since-last-login/#findComment-499618 Share on other sites More sharing options...
supermerc Posted March 24, 2008 Author Share Posted March 24, 2008 What would that look like? I never herd of it. Link to comment https://forums.phpfreaks.com/topic/97642-since-last-login/#findComment-499624 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.