Execute query after 1 hour

Attached the table sample.
enter image description here

What i am trying to achieve is on every hour it selects one media_id (id=1) and executes my code, then 2nd hour (id=2) and so on, How I can track which one to execute and whats the latest, Do I need to add a new table and save the current id or what? Really confused on this.

$check5 = "select * from media_ids";
$rs5 = mysqli_query($con,$check5);
$row = mysqli_fetch_assoc($rs5);

// execute query

Source: mysql

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.