Kullanıcıların birçok kriterlere göre arama filtre hangi bir restoran arama yapıyorum ...
Ben üç tablo var:
Table1 - **Restaurant**
------+----------+----------
id + name + place
------+----------+----------
1 Rest1 Ny
2 Rest2 La
3 Rest3 Ph
Table2 - **r_type**
------+----------+----------
id + name + code
------+----------+----------
1 type1 0
2 type2 1
3 type3 2
4 type4 3
Table3 - **type_stack**
------+----------+----------
id + rest_id + type
------+----------+----------
1 2 2
2 4 1
3 1 2
Now people may search for restaurant with type1 and type2 or only one type etc... How do i generate queries based on the check box state that user has choose. How is it done in php? There will be around 7-12 checkboxes.
Another question is what would be the best method to implement this? Is this kind of tables ok? Because users will have the option to change their options and refresh their results using ajax. So server load will be more.
Thank You