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/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php