Hello, You said that you are using MySQL. Create 2 columns like:
create_ts INT UNSIGNED NOT NULL, last_login_ts INT UNSIGNED NOT NULL Use the MySQL UNIX_TIMESTAMP() function, comparable to the PHP time() function (number of seconds since 1-1-1970 12:00:00 AM). UPDATE table SET last_login_ts=UNIX_TIMESTAMP() where ID=12345; -Jason Garber IonZoft.com At 02:45 PM 11/17/2001 +0000, Srinivasan Ranganathan wrote: >Hi > >I need to store the date and time of sign-up and date >and time of last successful login in a mysql database >and calculate how long the user has been using a site. >how do i do this? > >thanks in advance >Srinivasan > >__________________________________________________ >Do You Yahoo!? >Everything you'll ever need on one web page from News and Sport to Email >and Music Charts >http://uk.my.yahoo.com > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
