Re: Weird nested while loop problem

From: Date: Wed, 17 Jan 2001 22:22:42 +0000
Subject: Re: Weird nested while loop problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-35181@lists.php.net to get a copy of this message
> $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. - Darryl ---------------------------------------------------------------------- Darryl Friesen, B.Sc., Programmer/Analyst Darryl.Friesen@usask.ca Education & Research Technology Services, http://gollum.usask.ca/ Department of Computing Services, University of Saskatchewan ---------------------------------------------------------------------- "Go not to the Elves for counsel, for they will say both no and yes"

« previous php.general (#35181) next »