I have a advanced search form which passes many variables to another page next.php
.
My question is I want to check the variable is null or not inside query .
Can i use like this or is there any function like this??
$price=$_GET['price'];
$query="SELECT * FROM products WHERE (if price!='' { $price; } )";
Simply i want is if $price
is null , i do not want check in where condition because it affects results.
How to do this guys??
Give me a solution
Thankss