php - How to construct the query -


I am confused about creating a query. I am implementing the search feature in a restaurant site. The user first searches for the area that he is searching for the restaurant and then he selects food types like Chinese, Japanese, Thai from the checkboxes.

After selecting all these, the restaurants which provide selected food in the selected area will be displayed.

I am creating two tables with the following fields;

Restaurant_dp table

  PIN ID - ID  

restaurant_ iw table

  id - menu of restaurant menu - menu offers restaurants  

My confusion status can be obtained from both tables:

  • podcast = user select pinch
  • menu = userchurch menu
< P> plaz Any help would be appreciated

  select DISTINCT dp.id from Restaurant_ DP DP INNER JOIN restaurant_iw iw ON dp.id = iw.id WHERE dp.pcode = $ pcode and iw.menu = $ menu  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -