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:[EMAIL PROTECTED]]
Enviado el: Domingo, 25 de Febrero de 2001 05:30 a.m.
Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
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



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