Jump to content

PHP MySQl LOOP


NoMansLand

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/146067-php-mysql-loop/
Share on other sites

[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)) {

Link to comment
https://forums.phpfreaks.com/topic/146067-php-mysql-loop/#findComment-766865
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.