Forum Moderators: coopster
[webmasterworld.com...]
This thread recommends not combining comma joins and left joins as I am with my search. The statement I have is below:
mysql_select_db($database_master_user, $master_user);
$query_getAssignment = "SELECT *, projects.projectName FROM assignments LEFT JOIN projects USING (projectID) WHERE assignments.empNo =".$employeeNo . " ORDER BY assignments.projectID";
Can someone help me phrase this so that I do not need to mix comma and inner joins? Or does anyone know of another way around this problem?
Thanks in advance,
Maybe indices type does not match. Just a guess.
Also try replacing this
WHERE assignments.empNo =".$employeeNo . " ORDER BY assignments.projectID";
with this
WHERE assignments.empNo = '".$employeeNo . "' ORDER BY assignments.projectID";
Adding quotes will not hurt. Also remember to escape $employeeNo with mysql_real_escape_string