<?php
if($_GET["Name"]!="Month" )
{
$objConnect = mysql_connect("localhost","","") or die("Error Connect to Database");
$objDB = mysql_select_db("");
$strSQL = "SELECT * FROM db WHERE (Name LIKE '%".$_GET["Name"]."%' and dmy where MONTH(dmy) LIKE '%".$_GET["Month"]."%')";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
SELECT * FROM db WHERE (Name LIKE '%".$StrName ."%' AND (MONTH(dmy) = MONTH('".$M1."'))";
Code (PHP)
$StrName = $_GET["Name"];
$M1 = $_GET["Month"];
//$M1 = '2017-08-01';
$strSQL = "SELECT * FROM db WHERE (Name LIKE '%".$StrName ."%') AND (MONTH(dmy) = MONTH('".$M1."'))";