I want to delete the record from table after 10 seconds of insertion. Basically I am sending data from my python script to PHP server and storing it into database. Below is my MySQL query but it is not working i don't know why? any help would be appreciated Thank you.
$sql5= "DELETE FROM data1 WHERE creation_time >(NOW()- INTERVAL 10 SECOND)";
$res = $conn->query($sql5);
Note: Here creation_time is my column which contains time and date of insertion of data.