hello friend is it possible and how to do that
i have 6 banners in the mysql now i want to show the banners randoms which i have done it
but now what i want is the banners should show in equal numbers
if a banner is shown banner1.jpg is displayed 10 times and another banner2.jpg is shown only 8 times then the banner2,.jpg will complete the 10 figure first is it possible i am pasting some of the code...
<?php
require "connection.php";
echo "shree swami samartha<br>";
//echo "<a href=http://google.com><img src=468x60.gif width=468 height=60 border=0></a>";
$result = mysql_query("SELECT * FROM banner_data order by rand() limit 1");
while($row=mysql_fetch_array( $result ))
{
$url=$row['url'];
$img_src=$row['img_src'];
$img_alt=$row['alt'];
$banner_id=$row['banner_id'];
$hits=$row['hits'];
//echo "<b>".$banner_id.$url.$hits."<b>";
echo "<a href=click.php?&i=".$banner_id."&jump_url=".$url."><img src=".$img_src." border=0></a>";
$nhits=$hits + 1 ;
echo $nhits;
mysql_query("UPDATE banner_data SET hits='$nhits' WHERE banner_id='$banner_id'");
//echo "<BR>Record $ud_id <-- Updated<BR><BR>";
}
?>