In article <030601c09f05$2b9e6e70$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Keith Spiller") wrote:

> Can anyone tell me why this:
>   Line 282    mysql select db("centraldb",$db);
>   Line 283    $qorder++; 
>   Line 284    $result = mysql query("SELECT q.questid, q.question, q.answer, 
>   q.qorder, q.depart, q.catid, 
>                   q.active, q.global, q.adate, q.author, q.authoremail, 
>                   q.askemail, c.catid, c.category, c.under, 
>                   c.corder, c.active FROM central groupfaqq q, central 
>                   groupfaqcat c WHERE q.active = '1' AND 
>                   q.global = '1' AND c.active = '1' ORDER BY c.under, 
>                   c.order, q.qorder",$db);
>   Line 285    while ($myrow = mysql fetch row($result))
> 
> Would cause this error:
>   Warning: Supplied argument is not a valid MySQL result resource in 
>   faqbody.php3 on line 285
> 
> When changing the same SELECT statement to:
>   Line 284    $result = mysql query("SELECT * FROM central groupfaqq WHERE 
>   active = '1' ORDER BY
>                    qorder",$db);
> 
> Works perfectly?

Sounds like the 'while' loop is failing because mysql_query isn't returning 
to $result what you think it is.  Add some error-checking, starting with at 
least an "or die(mysql_error())" on the query.  Also, try running the same 
query at the command line to confirm that it's valid.

-- 
CC

-- 
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