Mysql,数据库中明明有这条数据却查不出来?

数据库里看到有113.107.112.3这条数据却不能用SELECT * FROM newiptemp WHERE newip="113.107.112.3"查询出来。


使用SELECT * FROM newiptemp WHERE newip LIKE "113.107.112.3%"  

就能查询出来。


因为里面还有看不见的字符。比如空格和换行


这时候就要处理一下这些字符了,mysql中的函数 trim和replace可以使用


另外参见帖子:

http://topic.csdn.net/u/20090516/22/84045226-63e0-4f5a-910f-18d83fa3b31a.html

posted on 2011-08-05 11:27  Miracle刘  阅读(2045)  评论(0)    收藏  举报