I have an sql query that looks like this:
<?php
include("settings.php");
$sql = conn->query("SELECT * FROM table LIMIT 1");
$content = $sql->fetch_assoc();
$id = $content['id'];
/* PHP Operations here. */
?>
Now, I want to be able to repeat this sql query every lets say 5 minutes, because the tables content will change. How can I do this? Is there a way to do an sql request in a javascript or ajax script?