我有3个MySQL表:
和2页:
laptop.php(将有一系列笔记本电脑品牌)
我试图查询显示produs的名称和价格:
示例:(它不起作用,我不知道为什么):
SELECT t1.*,t2.*,t3.* FROM produs as t1 join spec_laptop as t2 join spec_telefon as t3 WHERE(t1.id=t3.id_produs OR t1.id=t2.id_produs) AND t2.brand='Acer'
答案 0 :(得分:0)
你以错误的方式加入了他们,试试这个:
SELECT * FROM produs as t1
inner join spec_laptop as t2 ON t2.id_produs = t1.id
inner join spec_telefon as t3 ON t3.id_produs = t1.id
WHERE t2.brand='Acer'