Oops, you have one more error that I see, one one line you reference
author-cat as a table name and on another you refer to it as author_cat.
Make the appropriate change and try it again. One of the table references is
wrong and will generate a missing table error.
Jim
-------Original Message-------
From: Wilmar Perez
Date: Friday, September 06, 2002 09:57:48
To: php-db mailing list
Subject: [PHP-DB] not a valid MySQL result
Hello guys
This is my first posting to the list, even though I've had some experience
with C++, these are my first steps with php and mysql.
Well, the thing is that I'm getting the following message:
Warning: Supplied argument is not a valid MySQL result resource
in /var/www/bva/new/main/colecciones.php on line 35
The code is shown below:
$query_cat = "select author_names || ' ' || author_surnames
from author, author-cat
where author_cat.cat_code = $code
and author.author_code = author-cat.author_code";
$result_cat = mysql_query($query_cat);
$num_results_cat = mysql_num_rows($result_cat); //This is line 35
I did the same with a simpler select sentence and it worked alright, so I
guess there's a problem with the select sentence but haven't been able to
find it.
Does anyone have an idea?
Thanks a lot for your help.
*******************************************************
Wilmar Pérez
Network Administrator
Library System
Tel: ++57(4)2105145
University of Antioquia
Medellín - Colombia
2002
*******************************************************
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.