seany123 Posted February 23, 2009 Share Posted February 23, 2009 what i want is for members to be echod in a table if they have like a >= 1 value in there table. and then i want it the table to be accending. so.. say the value is $warnings i want all members with $warnings >= 1 to be displayed in a table which as it goes down.. example. player 1 | 1 player 55 | 20 Player 2 | 60 can anyone give me a hint at doing this? edit: just a quick thought.. if there was say 200 people with warnings >= 1 then the table and page would be really long, so maybe a page thing for the tables would be cool. Quote Link to comment Share on other sites More sharing options...
wrathican Posted February 23, 2009 Share Posted February 23, 2009 Look at the ORDER and LIMIT MySQL clauses Quote Link to comment Share on other sites More sharing options...
jackpf Posted February 23, 2009 Share Posted February 23, 2009 $sql = mysql_query("SELECT * FROM $tb WHERE warnings > 0 ORDER BY ID ASC"); while($fetch = mysql_fetch_array($sql)) { $name = $fetch['name']; $warnings = $fetch['warnings']; echo '<ul> <li>$name - $warnings</li> </ul>'; } Any help? Quote Link to comment Share on other sites More sharing options...
seany123 Posted February 23, 2009 Author Share Posted February 23, 2009 i tried to get it working useing your post as a template but failed. Quote Link to comment Share on other sites More sharing options...
jackpf Posted February 23, 2009 Share Posted February 23, 2009 What error are you getting? Quote Link to comment 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.