Jump to content

[SOLVED] How many seconds passed


EchoFool

Recommended Posts

I am trying to make a field in my query to hold how many seconds have passed from a date in my table but it keeps returning total number of days passed so i get a return of 0. What function should i actually be using ?

 

This is what i tried:

<?php
$GetDate = mysql_query("SELECT DATEDIFF(NOW(), Date) AS  SecondsPassed FROM users
				WHERE  UserID='{$_SESSION['Current_User']}'")
				or die(mysql_error());
?>

 

Hope you can help me.

Link to comment
https://forums.phpfreaks.com/topic/141629-solved-how-many-seconds-passed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.