Re: Weird nested while loop problem
| From: | Maurice Rickard | Date: | Wed, 17 Jan 2001 22:25:51 +0000 |
| Subject: | Re: Weird nested while loop problem | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35183@lists.php.net to get a copy of this message | ||
At 4:22 PM -0600 1/17/01, Darryl Friesen wrote:
Hmm. I get the same error for $relationsrow there. At 5:22 PM -0500 1/17/01, Ignacio Vazquez-Abrams wrote:$relationsresult = mysql_query($relationsquery) or die(mysql_error()); while ($relationsrow = mysql_fetch_array($relationsresult)) { $thischild = $relationsrow["childsku"]; if ($thevalue == $thischild) { echo " checked"; } } // end while for relations loop reset($relationsresult);Nope. The array is $relationsrow (an array of the columns for the current row returned by mysql_fetch_array). $relationresult is just that; a result 'flag' for the query indicating whether or not the query was successful.
Um, no. $relationsresult isn't an array, it's a MySQL result resource. Use mysql_data_seek() instead.OK, could this be why I'm getting the same error message for $relationsrow? Thanks for the help, btw! -Maurice -- Maurice Rickard http://mauricerickard.com/