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. Link to comment https://forums.phpfreaks.com/topic/146487-echoing-members-from-database/ 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 Link to comment https://forums.phpfreaks.com/topic/146487-echoing-members-from-database/#findComment-769050 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? Link to comment https://forums.phpfreaks.com/topic/146487-echoing-members-from-database/#findComment-769052 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. Link to comment https://forums.phpfreaks.com/topic/146487-echoing-members-from-database/#findComment-769073 Share on other sites More sharing options...
jackpf Posted February 23, 2009 Share Posted February 23, 2009 What error are you getting? Link to comment https://forums.phpfreaks.com/topic/146487-echoing-members-from-database/#findComment-769124 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.