【发布时间】:2014-11-22 19:51:35
【问题描述】:
我有两张桌子restaurants 和meals。餐厅有
`id`
`name`
`menu`
`image`
`text`
`address`
吃饭有
`meal_id`
`meal_name`
`meal_image`
`meal_weight`
`meal_price`
`meal_menu`
我认为将它们联系起来meal.restaurant.id。这是一个好方法还是更好地制作另一个(第三个)表并将它们连接到那里。
Can you provide me with a query how when restaurant with ID=1 is selected to show meals for this restaurant only.现在我想在meal_menu 行中保存餐厅ID。
【问题讨论】: