Jump to content

Question Regarding FROM_UNIXTIME and UNIX_TIMESTAMP


Kevin3374

Recommended Posts

I have a bunch of dates in a MySQL table that were inserted using FROM_UNIXTIME and stored in a field of type DATE.  When I execute a query a SELECT query using UNIX_TIMESTAMP I get nothing.  However, if I write a regular SELECT without UNIX_TIMESTAMP, I get the correct dates back, but as strings.  Anyone have any ideas on why UNIX_TIMESTAMP is causing problems.

 

Something else interesting, is when I run the query from the MySQL console itself, the query works.  But when I execute the same query from within a PHP script, I get nothing.

 

Any thoughts or tips would be greatly appreciated.

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.