date / time format of now () in mysql

0
$verificatempo = mysql_query("SELECT * FROM logs
WHERE horario <= now() - INTERVAL 10 MINUTE
AND ip = '$ipaddress'
ORDER BY horario desc limit 1");

I'd like to know the date and time format identical to the now () that was used in the mysql line of code for comparison. If possible, it can be an equal code.

    
asked by anonymous 29.08.2017 / 20:59

1 answer

0

The NOW() function returns the current date and time in the time zone set as a string or a number in the format YYYY-MM-DD HH: MM: DD or YYYYMMDDHHMMSS.uuuuuu .

The type returned depends on the context in which it is used.

Examples

SELECT NOW();

Result:

SELECTNOW()-INTERVAL10MINUTE

    
30.08.2017 / 02:50