我有需要更新的网页,例如,如果某些表格中的文章已经过了 7 天,那么该页面将查看通知窗口,提示有一些旧文章需要更新
如何跨多个表检查日期?
$sql = "select topic.*
, id.*
from $table_1
, $table2
where (date of the article) < (<date of the article+ 7 days...>)" ;
// the arctile has passed 7 days
$rs = mysql_query($sql);
$nos = mysql_num_rows($rs);
$obj = mysql_fetch_object($rs);
if($row = mysql_fetch_array($sql))
{
// I want to display window that display note
// there is artiles need to be updated and list of those topics"
<script language="javascript" type="text/javascript">
function print_msg(opt,id)
{
if(confirm("show old topics"))
{
window.location="home.php";
}
else
{
return false;
}
}
</script>
//here are the topics need to be updated
echo obj->topic;
}