0) or (grp = $group and limit_type = 4)"); if (mysql_num_rows($get) > 0) { $avail = $get; while ($rand_rows = mysql_fetch_array($avail)) { $id_array[] = $rand_rows[id]; } srand((double)microtime()*1000000); shuffle($id_array); srand((double)microtime()*1000000); shuffle($id_array); $pick = $id_array[0]; $sb = mysql_query ("select * from idev_banners where id = $pick"); $s = mysql_fetch_array($sb); $b = $s[banner]; $t = $s[target]; $lim = $s[limit_type]; $desc = $s[description]; $a = $s[count]; $alt = $s[alt]; if ($lim == 1) { mysql_query("update idev_banners set count = count-1 where id = $pick"); if ($a == $nli) { $ntype = "$notify_limit_imp Impressions"; include("config/email.php"); } } mysql_query("update idev_banners set imp = imp+1 where id = $pick"); print "\"$alt\""; } ?>