There is a filter with a lot of data:
- price: minimum, maximum
- number of rooms: studio, 1,2,3,4 +
- finishing: without finishing, draft, fair
- delivery of the object: 2017,2018,2019,2020
- Payment options: installment plan, mortgage, mat capital
- apartment area: min, max
- class: economy, comfort, business, premium
Each filter value may or may not be selected. The database stores data in various interrelated tables. Actually, the question is how to take into account all the parameters when creating the SQL query?
whereclause to a condition in the form:where 1=1 and (дальше условия, например:) rooms in (1, 2, 3, 4) and class in ('econom', 'comfort') and ...- Denis