RE: [PHP-DB] not a valid MySQL result

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: RE: [PHP-DB] not a valid MySQL result
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-21617@lists.php.net to get a copy of this message
Change your query to be: $query_cat = "select concat(author_names, ' ', author_surnames) as somenewcolname from author, author-cat where author_cat.cat_code = $code and author.author_code = author-cat.author_code"; Change somenewcolname to whatever you want the column to be called or leave the "as somenewcolname" part off if you don't care what the column name is. This should help. Jim -------Original Message------- From: Wilmar Perez Date: Friday, September 06, 2002 12:16:28 To: php-db@lists.php.net Subject: RE: [PHP-DB] not a valid MySQL result Hi guys Thanks for your help. Peter was right I had an error in the sentence, I worked it out but still the same error came up. The mysql_error() function doesn't return any thing. Any idea? Thanks a lot. >Hi >Couple of points, you probably have an SQL error, >I use >echo $query; >echo '<br>'.mysql_error(); >which shows the query and the error >you use 'author-cat' in the table name >and 'author_cat' and 'author-cat' in the where clause which will throw an >error. ******************************************************* 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 .

« previous php.db (#21617) next »