require_once('Connections/connect.php');
mysql_select_db($database_connect, $connect);
$sql = "select * from request where dep='$dep' and ((date between '$startMonth12' and '$nextMont12') or (date between '$startMonth22' and '$nextMont22')) ";
$query = mysql_query($sql);
if(mysql_num_rows($query) >0){
echo "<script>alert('เดือนนี้ หน่วยงานของคุณได้ทำการเบิกของไปแล้ว');history.back();</script>";
exit();
}
((date between '$startMonth12' and '$nextMont12') or (date between '$startMonth22' and '$nextMont22')) TO
((date between '$startMonth12' and '$nextMont12') and (date between '$startMonth22' and '$nextMont22'))