String sql = "exec pageview 'oa_addrlist','( "+type+" = 0 and type = 0) or (employee_id = '"+personid+"') and type = "+type+") ' ";
执行成SQL语句后变成
exec pageview 'oa_addrlist','( 0 = 0 and type = 0) or (employee_id = '31DA29C6A00B' and type = 0 )'
语法错误employee_id = "31DA29C6A00B"双引号才是对的,我应该在代码里怎么改才能在SQL中是双引号?
执行成SQL语句后变成
exec pageview 'oa_addrlist','( 0 = 0 and type = 0) or (employee_id = '31DA29C6A00B' and type = 0 )'
语法错误employee_id = "31DA29C6A00B"双引号才是对的,我应该在代码里怎么改才能在SQL中是双引号?
但是,不知道你的sql是什么的语法
而且,你这个可能有SQL注入的风险