Erro na query: SELECT ip, DATE_FORMAT(time, '%H') as date from on_off_admin ORDER BY time DESC LIMIT 1.