id name * * * 1 lucy ... 3 lucy ... 2 lily ... 4 lucy ...
id name * * * 1 lucy ... 3 lucy ... 4 lucy ... 2 lily ...
FIND_IN_SET(str,strlist)
mysql> SELECT FIND_IN_SET('b','a,b,c,d');
-> 2
id name FIND_IN_SET * *
1 lucy 1 ... 3 lucy 1 ... 2 lily 0 ... 4 lucy 1...
mysql> select * from test;
+----+-------+ | id | name | +----+-------+ | 1 | test1 | | 2 | test2 | | 3 | test3 | | 4 | test4 | | 5 | test5 | +----+-------+
mysql> select * from test where id in(3,1,5);
+----+-------+ | id | name | +----+-------+ | 1 | test1 | | 3 | test3 | | 5 | test5 | +----+-------+ 3 rows in set (0.00 sec)
select * from table where id IN (3,6,9,1,2,5,8,7);
select * from table where id IN (3,6,9,1,2,5,8,7) order by field(id,3,6,9,1,2,5,8,7);
FIELD(str,str1,str2,str3,…) Returns the index (position) of str in the str1, str2, str3, … list. Returns 0 if str is not found.
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有