I'm trying to convert some of my scripts using mysql to mysqli. (it's time )
I have a problem with a request that works in phpmyadmin but when calling from a php script I have an error:
this query is working with mysql , but isn't with mysqli !ERROR - Bad Select Statement: SELECT UNIX_TIMESTAMP(LogDateTime), Temp, Hum FROM AllCdata WHERE LogDateTime > (SELECT MAX(LogDateTime) - INTERVAL 12 day FROM AllCdata) ORDER BY LogDateTime ASC