On Wed, 17 Jan 2001, Maurice Rickard wrote:

> Thanks!  This is starting to make sense...although when I try to
> reset what I thought was my array, I get the "Variable passed to
> reset() is not an array or object" error message.  Here's the
> relevant code:
>
> $relationsquery = "select * from relations where
> childtype='$childtype' and parenttype='$parenttype' and
> parentsku='$parentsku'";
>
> $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);

Um, no. $relationsresult isn't an array, it's a MySQL result resource. Use
mysql_data_seek() instead.

> Thanks again for your help so far!
> Maurice
>

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to