joecooper Posted August 27, 2011 Share Posted August 27, 2011 Hi, my site is displaying something weird, http://86.21.243.231/ on the table at the bottom, it should list the amount of tickets sold. if the user deposits 0.3, then it should display 3 seperate rows for 0.1 with their payout address. but for 0.3, it displays 2 rows of 0.15 instead. the code for the table is: $sql="SELECT * FROM tickets WHERE `round` = '$round' AND `confirmed` = 'yes' ORDER BY timestamp ASC"; $result=mysql_query($sql); $row=mysql_fetch_array($result); $result=mysql_query($sql); while($row = mysql_fetch_array( $result )) { $ticketamount = $row['amount']; $ticketspurchased = (int)($ticketamount / $ticketprice); $ticketamount = $ticketamount / $ticketspurchased; for ( $counter = 1; $counter <= $ticketspurchased; $counter += 1) { $i++; echo "<tr><td>"; echo $i; echo "</td><td>"; echo $row['address']; echo "</td><td>"; echo $ticketamount; echo "</td><td>"; echo $row['confirmed']; echo "</td><td>"; echo $row['timestamp']; echo "</td></tr>"; } } 0.5 shows correctly Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/245801-problem-with-displaying-query/ Share on other sites More sharing options...
joecooper Posted August 27, 2011 Author Share Posted August 27, 2011 bump Quote Link to comment https://forums.phpfreaks.com/topic/245801-problem-with-displaying-query/#findComment-1262581 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.