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: [EMAIL PROTECTED]
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
.