我有一个结构如下的文件:
<?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>
}
?>
我尝试在几秒钟内自动刷新页面,并在将新数据添加到表tb_history时停止刷新。你能建议我更好的算法吗?
谢谢......