如何正確使用這個IN
OR
select語句? (其實一切除了where bdt.active='yes'
作品)如何在MySQL中使用關鍵字IN OR內聯3個表?
SELECT bdt.*, specials.*, stars.*
FROM bdt INNER JOIN specials ON bdt.id = specials.id
INNER JOIN stars ON specials.id=stars.id
WHERE bdt.active='yes'
AND bdt.business_type IN ('entertainment')
OR bdt.business_subtype IN ('entertainment')
OR bdt.subtype2 IN ('entertainment')
OR specials.type IN ('entertainment')
schwiing!我從來不知道()謝謝你! – carm
實際上都沒有工作。我應該透露我有一個子查詢附加到此查詢,停止工作時,我應用修復程序。非常感謝您的幫助,謝謝。 ('''')和特殊類型IN('娛樂')特殊選項。(bdt.id = specials.id WHERE bdt.active ='yes'和specials.date> = CURDATE()和specials.type IN('entertainment')和bdt.id =「。$ row_entertainment ['id']」。 GROUP BY specials.title ORDER BY specials.date,specials.price ASC LIMIT 7「; – carm