Hello,
This is my query…,
$sschoolnamenew=$_GET['sschoolnamenew'];
$spname=$_GET['spname'];
$sfrom=$_GET['sfrom'];
$sto=$_GET['sto'];
echo $sql="SELECT * FROM `products`
where (school_id is null or school_id=:sschoolnamenew) AND
(pcat_id is null or pcat_id= :spname) ";
$query = $conn->prepare($sql);
$query->bindParam(':sschoolnamenew', $sschoolnamenew);
$query->bindParam(':spname', $spname);
$query->execute();
But it wont run what i did wrong…?
any suggestion please…