" . $cutoff . " and status = 'p' order by entrytime desc"; $getlatest = mysql_query($getlatestsql, $conn); if (!mysql_num_rows($getlatest)) { $getlatestsql = "select id from n_arts where status = 'p' order by entrytime desc limit 5"; $getlatest = mysql_query($getlatestsql, $conn); } $newest = array(); while ($latest = mysql_fetch_array($getlatest)) { if (!in_array($latest[id], $feat)) $newest[] = $latest[id]; }; if ($newest) { ?>

Recommended reading

" . $cutoff . " order by entrytime desc"; $getdebate = @mysql_query($getdebatesql, $conn); $popular = array(); while ($debate = @mysql_fetch_array($getdebate)) { $countcommssql = "select count(*) from n_comms where art = " . $debate[art]; $countcomms = @mysql_query($countcommssql, $conn); $comms = @mysql_fetch_array($countcomms); if ($comms[0] > 3) { $popular[] = $debate[art]; }; }; if ($popular) { ?>

Random reading