Jump to content

query to go by minutes not days


EchoFool

Recommended Posts

I have a query which gets the days of a date field .. but i need it to do minutes... how is this done?

 

This is my query:

$GetHospital = mysql_query("SELECT DATEDIFF(NOW(), `When`) As BeenIn FROM hospital WHERE UserID='{$_SESSION['Current_User']}'")
Or die(mysql_error());

 

When i echo Row['BeenIn'];

I get an echo of 1 because its 1 day, even though really it should be in minutes so it would be like 9 minutes or some thing like that... how can i do this?

Link to comment
https://forums.phpfreaks.com/topic/96810-query-to-go-by-minutes-not-days/
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.