搜索

2017-04-25 68 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

是的,这应该工作,那么问题是什么? –