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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.