RE: [PHP-DB] Join causing Error?
| From: | Scott Bernard | Date: | Sun, 25 Feb 2001 16:58:53 +0000 |
| Subject: | RE: [PHP-DB] Join causing Error? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-6940@lists.php.net to get a copy of this message | ||
Where is the join condition on that quey? (the field in common on the to
tables, to make the join).
idsarts
-----Mensaje original-----
De: Keith Spiller [mailto:larentium@gilanet.com]
Enviado el: Domingo, 25 de Febrero de 2001 05:30 a.m.
Para: php-db@lists.php.net; php-general@lists.php.net
CC: mysql@lists.mysql.com
Asunto: [PHP-DB] Join causing Error?
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?
Keith Spiller
a.k.a. Larentium