carleihar Posted November 15, 2009 Share Posted November 15, 2009 How would I display "days registered" on a page from an SQL database? Say if someone was entered into a database on Monday, on Thursday how would I show that they've been registered for 3 days? I have a column that shows the day they were created using NOW(). Also, would I be able to have a column in the database for days registered so its easier to access? It would need to automatically update. Thanks! Link to comment https://forums.phpfreaks.com/topic/181655-time-and-sql/ Share on other sites More sharing options...
michaellunsford Posted November 15, 2009 Share Posted November 15, 2009 you'd have to back into the number from the date. Try using strtotime() to convert your database field into the PHP timestamp and compare it to time() Link to comment https://forums.phpfreaks.com/topic/181655-time-and-sql/#findComment-958148 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.