标签:span style 遇到 lse class col where 判断 else
今天在大批量操作数据时,遇到此问题,解决如下:
1 if(cateName.indexOf("‘")!=-1){ 2 oql = " select * where name = ‘"+cateName.replace("‘", "‘‘")+"‘ "; 3 }else{ 4 oql = " select * where name = ‘"+cateName+"‘ "; 5 }
先对参数进行判断,当参数中含有单引号时,用"‘‘"替换单引号;
标签:span style 遇到 lse class col where 判断 else
原文地址:https://www.cnblogs.com/coder-wf/p/12192270.html