【发布时间】:2013-11-15 22:53:58
【问题描述】:
我有 3 张桌子: 产品、类别和 product_to_category。
产品
id name
1 monitor
2 computer
3 speaker
4 lcd
5 microphone
类别
id name
1 displays
2 speakers
product_to_category
id product_id category_id
1 1 1
2 4 1
3 3 2
我需要这样的东西:“扬声器”类别中的所有产品以及不属于任何类别的产品(计算机和麦克风)
product_id product_name
2 computer
3 speaker
5 microphone
我需要一个查询。我已经完成了两个查询,但我需要一个查询,因为 http://datatables.net/
【问题讨论】: