sql - Why am I getting "Ambiguous column name" in this query? -
i have following query:
$sql = "select * employee emp left join tr_bls_date bls on emp.employee_id=bls.employee_id , employee_id='".$id."'";
basically, both emp
, bls
tables have common employee_id
field. looking employee via employee's id ($id
). doing wrong here?
because there 2 tables contains employee_id
, server confused search. fix problem, add source table, eg.
on emp.employee_id = bls.employee_id , emp.employee_id = ? // search on table employee
Comments
Post a Comment