want to know the correct left join
===

I have this query where i want all the records of table mstemp must be shown based on the condition given.

SELECT mstEmp.empname, InDate, dailyattendance.InTime, dailyattendance.OutTime, mstEmp.teamtype FROM mstEmp LEFT JOIN dailyattendance ON (dailyattendance.HolderName = mstEmp.empname ) WHERE mstEmp.teamtype = '$chk' AND (InDate BETWEEN '$from' AND '$to' ) ORDER BY InDate ASC


But it seems this qurey isnt working .