I have a file with structure like this:
<?php
$query = mysql_query("SELECT id_history FROM tb_history");
$data = mysql_fetch_array($query);
$VariableA = count($data);
$variableB = $VariableA + 1;
if($VariableA == $VariableB)
{
<script>clearInterval();</script>
}
else
{
<script>setInterval()</script>
}
?>
I'm trying to make a page refresh automatically within few second and stop refreshing when a new data added to table tb_history. can you suggest me better algorithm??
Thank You...