Jump to content

Query not returning value


EchoFool

Recommended Posts

I have a query which checks a timestamp to "NOW()" but it returns nothing.. i echo it and i get nothing , yet with error reporting on it doesn't give me undefined error :S

 

This is what i got:

 

LastAction - 0000-00-00 00:00:00 -Timestamp format

 

SELECT *,
TIMESTAMPDIFF(MINUTE,'NOW()','LastAction') AS MinutesAgo 
FROM ".tablename().".user_data 
WHERE UserID='$UserID'

 

Then i echo it later on :

$row = mysql_fetch_assoc($SELECT);
Echo 'Minutes ago: '.$row['MinutesAgo'];Echo '<br>';
Echo 'Username: '.$row['Username']; Echo '<br>';

 

The return gives:

Minutes ago:

Username: Username1

Any idea why this is happening?

Link to comment
https://forums.phpfreaks.com/topic/199048-query-not-returning-value/
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.