i can't understand why ads are also showing when it is paused , please can any1 tell me what is wrong in this ?
in database paused=1 but still ads are showing , why?
PHP Code:
$advids = mysql_query("SELECT id FROM advertiser WHERE id != '$uid' AND points >='".CRATE."'");
while($advid = mysql_fetch_array($advids))
{
if($adult == 'adult')
{
$sql = mysql_query("SELECT * FROM adverts WHERE paused='0' AND countries LIKE '%$country%' OR countries='WORLD' AND userid='$advid[0]' AND approved='1' ORDER BY RAND() LIMIT 5") or die(mysql_error());
}
else
{
$sql = mysql_query("SELECT * FROM adverts WHERE paused='0' AND countries LIKE '%$country%' OR countries='WORLD' AND adult='0' AND userid='$advid[0]' AND approved='1' ORDER BY RAND() LIMIT 5") or die(mysql_error());
}
while($ad = mysql_fetch_array($sql))
{
$t = htmlspecialchars($ad['title']);
$l = htmlspecialchars($ad['link']);
.........................
Comment