如何根据条件刷新页面。例如,我有一个表中的值,如果该表中的值为NULL,则不应执行刷新。如果有值,则应刷新页面。谢谢!
<?PHP
$db_con = oci_connect('system', 'password1', 'dashboard');
$page = isset($_POST['page']) ? intval($_POST['page']) : 1;
$rows = isset($_POST['rows']) ? intval($_POST['rows']) : 30;
$sort = isset($_POST['sort']) ? strval($_POST['sort']) : 'NGM_ID';
$order = isset($_POST['order']) ? strval($_POST['order']) : 'asc';
if($page == 1)
$offset = (($page-1)*$rows) - 1;
else
$offset = ($page-1)*$rows;
$result = array();
$sql = "select TIMESTAMPEND from DASH_TRANSMITSTATE order by TIMESTAMPSTART desc";
$stid = oci_parse($db_con, $sql);
oci_execute($stid);
$row = oci_fetch_row($stid);
if ($row[0] != null) { ?>
<script> location.reload(true); </script>
<?php }
... // code php