搜索

2017-04-25 65 views
0
select * from vis_provider where 
    FIND_IN_SET(('German'),CONCAT(
       DoctarLanguage1,',', 
       DoctarLanguage2,',', 
       DoctarLanguage3,',', 
       DoctarLanguage4,',', 
       DoctarLanguage5,',', 
       DoctarLanguage6)) 

這個MySQL查詢工作 我想是這樣的搜索

select * from vis_provider where 
    FIND_IN_SET(('German','French'),CONCAT(
       DoctarLanguage1,',', 
       DoctarLanguage2,',', 
       DoctarLanguage3,',', 
       DoctarLanguage4,',', 
       DoctarLanguage5,',', 
       DoctarLanguage6)); 
+0

什麼是您所遇到的問題?也請包括表格結構。 –

+0

這已經在這裏解決:http://stackoverflow.com/questions/5015403/mysql-find-in-set-with-multiple-search-string –

+0

可能重複[MySQL查找\ _in \ _set與多個搜索字符串(http://stackoverflow.com/questions/5015403/mysql-find-in-set-with-multiple-search-string) – Alex

回答

0
select * 
from vis_provider 
where FIND_IN_SET('German' , CONCAT(...)) 
    OR FIND_IN_SET('French' , CONCAT(...)) 
+0

我這樣做: - \t SELECT * FROM vis_provider其中 \t \t \t \t \t \t(DoctarLanguage1在( '西班牙語', '德語')) \t \t或 \t \t(DoctarLanguage2在( '西班牙語','熱爾馬N ')) \t \t或 \t \t(DoctarLanguage3在(' 西班牙語」, '德語')) \t \t或 \t \t(DoctarLanguage4在( '西班牙語', '德語')) \t \t或 \t \t(DoctarLanguage5在( '西班牙', '德')) \t \t或 \t \t(DoctarLanguage6在( '西班牙', '德'))我們可以有不同勢的方式來編寫代碼; –

+0

是的,這應該工作,那麼問題是什麼? –