not a valid MySQL result

From: Date: Fri, 06 Sep 2002 16:50:46 +0000
Subject: not a valid MySQL result
Groups: php.db 
Request: Send a blank email to php-db+get-21610@lists.php.net to get a copy of this message
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 *******************************************************

« previous php.db (#21610) next »