NoMansLand Posted February 20, 2009 Share Posted February 20, 2009 How would i go about a PHP loop to show a certain criteria e.g: database > flower flower | smell | colour Rose Nice Red Tulip Bad Yellow < Sunflower Meh Yellow < say i want to select them and show them but it has more Yellow in the colour, and show them only, how would i go about that? mysql_array or a while loop Kris Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted February 20, 2009 Share Posted February 20, 2009 See these threads for the PHP: http://www.phpfreaks.com/forums/index.php/topic,95441.0.html http://www.phpfreaks.com/forums/index.php/topic,95443.0.html And a bit of googling can pick up more SQL knowledge than any one person can learn in a day. Quote Link to comment Share on other sites More sharing options...
Q695 Posted February 20, 2009 Share Posted February 20, 2009 While ($row=...){ ... } Quote Link to comment Share on other sites More sharing options...
NoMansLand Posted February 20, 2009 Author Share Posted February 20, 2009 [Fri Feb 20 02:51:50 2009] [error] PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/skyitorg/public_html/client/admin/view.php on line 146 This is all im getting.. any idea's? the code is here: $sql = mysql_query("SELECT * FROM receipt WHERE docket = '$docket'"); while($row = mysql_fetch_assoc($sql)) { Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted February 20, 2009 Share Posted February 20, 2009 http://www.phpfreaks.com/forums/index.php/topic,95376.0.html the FAQs really encompass a lot of Frequently Asked Questions surprisingly enough. 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.