还在在修改ECMALL,其中自定义一个搜索,利用ECMALL自带的方式,只是修改了查询条件,PHP语句如下
http://shop2.78123.conn.in/admin/index.php?app=user&act=index&field_name=FROM_UNIXTIME(reg_time, '%Y-%m-%d' )&field_value='2010-05-30'&sort=reg_time+DESC其中 field_name 是 where条件,field_value是查询条件的值,执行后,总是自动给我加一个转义符,SQL语句成了SELECT COUNT(*) as c FROM ecm_member member LEFT JOIN ecm_store s ON member.user_id=s.store_id LEFT JOIN ecm_user_priv user_priv ON member.user_id=user_priv.user_id AND user_priv.store_id = '0' WHERE 1=1 AND FROM_UNIXTIME(reg_time, \'%Y-%m-%d\' ) like '%\'2010-05-30\'%'请问我应该如何把这个自动加上的转义符\去掉,或让他失效呢。以前在某教程上似乎看到过方法,忘了 求教,谢谢,尽量不要去改动PHP程序,
http://shop2.78123.conn.in/admin/index.php?app=user&act=index&field_name=FROM_UNIXTIME(reg_time, '%Y-%m-%d' )&field_value='2010-05-30'&sort=reg_time+DESC其中 field_name 是 where条件,field_value是查询条件的值,执行后,总是自动给我加一个转义符,SQL语句成了SELECT COUNT(*) as c FROM ecm_member member LEFT JOIN ecm_store s ON member.user_id=s.store_id LEFT JOIN ecm_user_priv user_priv ON member.user_id=user_priv.user_id AND user_priv.store_id = '0' WHERE 1=1 AND FROM_UNIXTIME(reg_time, \'%Y-%m-%d\' ) like '%\'2010-05-30\'%'请问我应该如何把这个自动加上的转义符\去掉,或让他失效呢。以前在某教程上似乎看到过方法,忘了 求教,谢谢,尽量不要去改动PHP程序,
magic_quotes_gpc设置为0
重启服务器
FROM_UNIXTIME(reg_time,'%Y-%m-%d' )=='2010-05-30'中的引号不被添加\ 呢,
用stripslashes