mysql查询字段中路径有关问题

WBOY
Release: 2016-06-13 11:10:00
Original
1040 people have browsed it

mysql查询字段中路径问题
我的mysql是ubuntu下5.5版本,
有个表是保存文件的windows路径如e:\test,结果我用select * from 表名 where file_path like "%e:\test%"语句是查询不到任何记录的,只有输入select * from 表名 where file_path like "%\test%"才能查到记录,请教高人解决之道
------解决方案--------------------
存储e:\test的时候,先转换成e
------解决方案--------------------
test再存储,取出后再对
------解决方案--------------------
替换成:\
------解决方案--------------------
e:\\test?
------解决方案--------------------
好像涉及到字符序列转义吧

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