$start = $_REQUEST["date1"];
$end= $_REQUEST["date2"];
$objConnect = mysql_connect("localhost","root","12345") or die("Error Connect to Database");
$objDB = mysql_select_db("alert");
$strSQL = "SELECT * FROM alert_request inner join alert_request_channel on alert_request.request_id=alert_request_channel.request_id where date_format(alert_request.settle_date,'%Y-%m-%d') BETWEEN $start and $end ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);