how to realize the if judgment of mysql. There is now a table with two key fields
SELECT * FROM house
WHERE price="8500" OR shoufu="30"
I think, when the $price passed in by php is empty, the sql search statement is
SELECT * FROM house
WHERE shoufu="30"
when the $shoufu passed by php is empty, the sql search statement is
SELECT * FROM house
WHERE price="8500"
it is not possible to judge with or. I want to use if to judge
. In addition, I would like to ask how to implement if else sql sentence judgment