redis - mysql 搜 集合 类型的 字段,怎么定位?
PHP中文网
PHP中文网 2017-04-17 15:56:27
0
1
384

type set('热血','励志','污','友情','冒险') DEFAULT NULL,

+----+--------------+
| id | type         |
+----+--------------+
|  0 | 热血,污,冒险 |
+----+--------------+

就是我只拿 type 包含 '热血' 的,当然也包含其他内容, 比如上面那条,不只有热血,还有冒险,搜索语句怎么写?

PHP中文网
PHP中文网

认证0级讲师

répondre à tous(1)
阿神
select * from table where `type` like '%热血%';

Like 用法:http://www.w3school.com.cn/sq...

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!