Im using an event stream to check a DB table to see if there are new entries. If the entry was submitted within a minute ago I want to get this data and then send it back to display.
Im using this code:
$query = "SELECT * FROM student_art WHERE created > NOW() - INTERVAL 1 MINUTE";
created is a timestamp that I have in each table row.
For some reason this is not working and it is retrieving the FIRST record in my DB and displaying it every few seconds.
it retrieves the last row but that entry was inserted a few hours ago…BUT I just noticed that the timestamp is different than my current local time. When I use NOW() in my query…what time is that?? It almost looks like NOW and the servers timestamp are different time zones?