Re: Help w/Error Message

From: Date: Fri, 06 Apr 2001 14:03:59 +0000
Subject: Re: Help w/Error Message
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47440@lists.php.net to get a copy of this message
In your query you have compid specified twice. If this field is named the same in two seperate tables, preface your fieldnames with the table names...
$sql="SELECT fname, lname, users.compid, status, dept, room, bldg, phone, ticket_num, tickets.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";
At 10:04 AM 4/6/01 -0400, 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: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#47440) next »