我插入了带单引号的列.因为$this->db->query已经照顾了所有的特殊性格.但我的问题是我在插入时插入ganesh的数据,只插入ganesh; 单引号丢失后的数据.所以我开始使用$this->db->escape但是这会为我的数据添加单引号,这不需要如何防止这种情况
我的代码
$sql="insert into tablename (list_name,list_address) values(?,?)"
$res=this->db-query($sql,array($name,$add));
Run Code Online (Sandbox Code Playgroud)
我的错误在前端.不是后端.我会删除这个问题.