0
我有一個顯示興趣的表。每個興趣都有一個ID。目前查詢只是爲一個ID帶回一個人。它基本上是網站上的一個過濾器,它根據興趣對結果進行分類。從一個表中檢索多個記錄
$catwhere = " and e.person_id IN (select escint_person from person_interests_person where escint_person = e.person_id and escint_interest = 26) ";
我希望它顯示來自多個興趣的結果。
所以在我的基本邏輯它看起來像這樣
$catwhere = " and e.person_id IN (select escint_person from person_interests_person where escint_person = e.person_id and escint_interest = 26,27,28,29) ";
,但顯然這是行不通的。
任何幫助,將不勝感激。
如果你已經知道'IN'子句,爲什麼不把它用於'escint_interest'和'26,27,28,29'? – mario