Home > Database > Mysql Tutorial > 查询某列字段是否存在空回车/空换行符

查询某列字段是否存在空回车/空换行符

WBOY
Release: 2016-06-07 14:54:50
Original
2608 people have browsed it

获取某个对象的list时,如果某列(某属性)存在空回车/空换行符的话,获取list时总是有错误,转json也出错 无 --查询数据中的换行符SELECT *FROM table_nameWHERE INSTR(fidle_name,CHR(13))0 --回车 OR INSTR(fidle_name,CHR(10))0 --换行table_name:要查的表fidl

获取某个对象的list时,如果某列(某属性)存在空回车/空换行符的话,获取list时总是有错误,转json也出错
--查询数据中的换行符
SELECT *
FROM table_name
WHERE INSTR(fidle_name,CHR(13))>0  --回车 
OR INSTR(fidle_name,CHR(10))>0     --换行


table_name:要查的表
fidle_name:怀疑存在回车/换行的列名
Copy after login
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