Alright I have came up with :
<?php
$result = mysql_query('SELECT banner, url FROM tb_ads ORDER BY RAND() LIMIT 1') or exit(mysql_error());
$row = mysql_fetch_assoc($result);
$a = $row['plan'];
$b = $row['membersb'];
echo '<center>';
echo '<a href="' . $row['url'] . '"><img border="0" src="' . $row['banner'] . '" alt="Advertisement" style="position:absolute;top:620;z-index:1"></a>';
echo '</center>';
//$queryb = "UPDATE tb_ads SET membersb='$membersb' +1 WHERE id='$id'";
//mysql_query($queryb) or die(mysql_error());
";
?>
The problem I am having is if plan= plan<=members then i need it to not show this banner.
I was wonder is there a way to implement and if statement like :
if ($a <= $v){
go get another $result till it does not <=
or can you put in a Where statement in the Select to like
Where plan='plan>=membersb' never seen that but dunno if there is a way to do it that I don't know...
I'm really lost on how I would do this.
<?php
$result = mysql_query('SELECT banner, url FROM tb_ads ORDER BY RAND() LIMIT 1') or exit(mysql_error());
$row = mysql_fetch_assoc($result);
$a = $row['plan'];
$b = $row['membersb'];
echo '<center>';
echo '<a href="' . $row['url'] . '"><img border="0" src="' . $row['banner'] . '" alt="Advertisement" style="position:absolute;top:620;z-index:1"></a>';
echo '</center>';
//$queryb = "UPDATE tb_ads SET membersb='$membersb' +1 WHERE id='$id'";
//mysql_query($queryb) or die(mysql_error());
";
?>
The problem I am having is if plan= plan<=members then i need it to not show this banner.
I was wonder is there a way to implement and if statement like :
if ($a <= $v){
go get another $result till it does not <=
or can you put in a Where statement in the Select to like
Where plan='plan>=membersb' never seen that but dunno if there is a way to do it that I don't know...
I'm really lost on how I would do this.