<?
$sql = "SELECT * FROM absence
WHERE (employee_id = '".$employee_id."') and (((('".$inputStart."' BETWEEN stdate and endate) or ('".$inputEnd."' BETWEEN stdate and endate)) ) OR (((stdate BETWEEN '".$inputStart."' and '".$inputEnd."') or (endate BETWEEN '".$inputStart."' and '".$inputEnd."'))))
";
?>