Toni Barskile wrote:
> 
> Hi:
> 
> Can someone please explain the following error message?
> 
> ERROR 1052: Column: 'compid' in field list is ambiguous
> 
> Here's my mySQL statement:
> 
> $sql="SELECT  fname, lname, compid, status, dept, room, bldg, phone,
> ticket_num, compid, date_rpt, request_type, hardware, model, dci,
> dci_num,software_type, software_pkg, problem, comments, entered_by
> FROM users, tickets
> WHERE users.compid = tickets.compid
> ORDER BY lname";
> 
> Thanks in Advance
> 
> Toni
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


You select from two tables that both have a column named 'compid'.
Your computer doesn't know which one of them it should use. So, you
should make that decision for 'm:

SELECT users.compid
or
SELECT tickets.compid
-- 

* R&zE:

***************************
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***************************

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to