webguync Posted June 18, 2008 Share Posted June 18, 2008 I believe this error is related to either MySQL or SQL. "Column 'employee_name' in field list is ambiguous" my SQL is $sql = "SELECT ID, employee_name, emp_id FROM $employee_table LEFT JOIN $check_table ON `ID` = `EmpID` ORDER BY ID ASC"; someone please explain to me what this means! Quote Link to comment Share on other sites More sharing options...
rhodesa Posted June 18, 2008 Share Posted June 18, 2008 when joining tables, you need to specify which table you are selecting from: $sql = "SELECT et.ID, et.employee_name, et.emp_id FROM $employee_table et LEFT JOIN $check_table ct ON et.ID = ct.EmpID ORDER BY et.ID ASC"; Quote Link to comment Share on other sites More sharing options...
webguync Posted June 18, 2008 Author Share Posted June 18, 2008 thanks for the explanation Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.