$strSQL = "SELECT * FROM NRI_Issue_Summary WHERE Service ='$service' AND YEAR(StartDate) = '$year' AND MONTH(StartDate) = '$month' AND DAY(StartDate) BETWEEN '1' AND '25' OR MONTH(StartDate) = '$pre_month' AND DAY(StartDate) BETWEEN '26' AND '31' ";
เป็น Code (PHP)
$strSQL = "SELECT * FROM NRI_Issue_Summary WHERE cast(Service as text)AS Service ='$service' AND YEAR(StartDate) = '$year' AND MONTH(StartDate) = '$month' AND DAY(StartDate) BETWEEN '1' AND '25' OR MONTH(StartDate) = '$pre_month' AND DAY(StartDate) BETWEEN '26' AND '31' ";