Hello , thanx for your replay im running auction site that the user with the highest unique bid wins ,now i want to put limit on user bids on the first 50 result from the auction!! i want it to be like that!! any user will have maximum 9 bids in first 50 results ,bid 10 will be burned(deleted or something) user can have 4 bids in a row it can be like that for example ( bid 10,11,12,13 or 21,22,23,24) user cannot have bids like that (2,3,4,5,6 or 10,11,12,13,14 ) user can have only group of 4 result ,group of 5 results the last bid that is between the 4 results will be deleted!! i hope you got me better now!! i try this code but it's limiting the user to maximum 5 bids from the total 0f 50 bids:
$query = mysql_query("SELECT * FROM `bidding_details` where bid_id=$bid_id and username='$username' order by bid_price desc limit 50") or die(mysql_error()); $username==$last; $last = 1; $count = 0; while ($line = mysql_fetch_array($query)) { if ($last == $line['username']) { $count++; } else { $last = 0; $count = 0; } if ($count > 4) { header("location:product_detailframe.php?msg=11&&bid_id=$bid_id"); exit; } }
any help will be very very helpful !!