SELECT fails???
| From: | borko.net) | Date: | Wed, 06 Sep 2000 21:06:14 +0000 |
| Subject: | SELECT fails??? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-2672@lists.php.net to get a copy of this message | ||
Hi everybody (especially those with InterBase experience),
when I run the following SELECT statement on mysql everything's fine ... it
fails, however,
in InterBase telling me
Warning: InterBase: Dynamic SQL Error SQL error code = -104 invalid column
reference in
/usr/local/apache/htdocs/projects/demoshopibase/showbasket.phtml on line 25
The statement goes here:
$sql = "SELECT p.id, p.name, p.price, b.sid, count(b.artno) "
$sql .= "FROM products p, basket b "
$sql .= "WHERE (p.id = b.artno) AND (b.sid = '$sid') "
$sql .= "GROUP BY p.id, b.artno "
If I leave out the GROUP BY clause, it doesat least it return data (in a way
I don't want it) :-(
InterBase docs say I might need a COLLATE clause for GROUP BY, but that's
not working either.
The database was created with DEFAULT CHARACTER SET ISO8859_1 and I assume
that is
fine for the GROUP BY clause without a COLLATE clause ... what am I missing
here? I do not
understand the problem, to be honest
________________________
Gruss, Arne Borkowski
Hamburg