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.