RE: [PHP] Help me learn! with an explanation of these two functions.

From: Date: Wed, 06 Nov 2002 07:58:01 +0000
Subject: RE: [PHP] Help me learn! with an explanation of these two functions.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-122948@lists.php.net to get a copy of this message
At 08:58 06.11.2002, Steve Jackson said: --------------------[snip]-------------------- >Joins. Cool. Never heard of them before now but have started >experimenting with them. >What does this error mean? > >Error: cannot select orderid >select orderid from orders, email where orders.orderid = email.orderid >and email.checked='no' >Column: 'orderid' in field list is ambiguous --------------------[snip]-------------------- In this case both tables (order and email) have a column named orderid. The select part pf your statement needs to specify the table name or alias where the orderid field should be taken from: select orders.orderid from orders, email where orders.orderid = email.orderid and email.checked='no' -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#122948) next »