Creating dynamic where clauses in mysql -


Is it possible to modify the criteria dynamically based on user selection? I am creating a form in which there are some dropdowns, for example, looking at the question given below, customers can search for properties based on value, neighborhood and type of property (i.e. Condo, Townhouse, Single Family etc.) is. However, there is also the option to return any kind of property, but keep in mind the other criteria. Is there a way in which a user has to return all the asset type, depending on which way is there a way to modify it dynamically?

  SELECT a.id, property_id, price, named section_name, baths, A, sub division B WHERE a.subdivision = b.id and property_type = $ property_type id ORDER " Just create your query dynamically. I'm called a PHP sign because it's a syntactic form. But it should look something like this: 

  $ query = & lt;  

Comments