$strSQL = "SELECT *
FROM tbl_plan ,tbl_departments , project
WHERE tbl_plan.plan_department = '$dep_id'
AND tbl_plan.plan_department = tbl_departments.dep_id
AND tbl_plan.plan_year = '$date'
AND tbl_plan.plan_name NOT IN ( SELECT pro_nameplan FORM project)
ORDER BY tbl_plan.plan_term ASC";