データベースに3つのテーブルがあると仮定します
Table:Category
category_id
Table:container
container_id
category_id
Table:products
container_id
product_id
category_id に基づいてすべての product_id を取得するにはどうすればよいですか?
たとえば、上記のテーブル内に次のデータがあります。
Table: category
sour
sweet
Bitter
Table: container
bottled
sachet
Table: product
sugar
vinegar
cocoa
tb_product
カテゴリ ( tb_category
) が甘いすべての製品 ( ) を取得するにはどうすればよいですか