mysql 正则查询信息解决方案

WBOY
Release: 2016-06-13 11:09:01
Original
788 people have browsed it

mysql 正则查询信息
   我想查询带有中括号的数据 如  参加合约计划即可优惠200-1000元。[嘻嘻]有意联系
   他就有'[ ]'这个  !但是我
SELECT *
FROM `topic_comment`
WHERE content
REGEXP '\[(.*)+\]'
   这样查询感觉怎么没用啊
------解决方案--------------------
SELECT *
FROM `topic_comment`
WHERE content
REGEXP '\\[.*\\]'
------解决方案--------------------
严重错误的做法!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template