ok so I realized a silly error, but it didn't completely solve the problem...
PHP Code:
$getWonItems = mysql_query("SELECT auctionid FROM probid_winners WHERE buyerid='$id'"); while ($wonItems=mysql_fetch_array($getWonItems)) { $mysql = "SELECT SUM(winamount) AS total FROM probid_auctions WHERE id='".$wonItems['auctionid']."'"; $earned = mysql_query($mysql) or die(mysql_error()); while($row = mysql_fetch_array($earned)){ $total = $row['total']; } }
The bolded part is what I changed. Ok so now.... the mysql_query on the first line does output multiple "auctionid"s which is perfect. The problem comes up on the 3rd line I believe because only 1 ".$wonItems['auctionid'] is used.
Last edited by MoForce : 06-28-2008 at 12:00 AM.
|