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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -