I do a lots of queries like:
SELECT THIS
FROM THAT
WHERE ROW_TIME < NOW()
How to create variable in PHP that will contain current time so i can make this work:
SELECT THIS
FROM THAT
WHERE ROW_TIME < '$variable'
?
I do a lots of queries like:
SELECT THIS
FROM THAT
WHERE ROW_TIME < NOW()
How to create variable in PHP that will contain current time so i can make this work:
SELECT THIS
FROM THAT
WHERE ROW_TIME < '$variable'
?
the PHP date($format)
function returns current time as a string. You can set the format using a string.
date("Y-m-d H:i:s")
You should use time() - it returns a timestamp. http://php.net/manual/en/function.time.php