首页  >  文章  >  数据库  >  mysql模糊查询匹配特殊字符

mysql模糊查询匹配特殊字符

WBOY
WBOY原创
2016-06-07 15:24:361992浏览

StringBuilder selectStatement = new StringBuilder(128).append(select).append(verbosity.getColumnSelectFragment()); StringBuilder fromStatement =new StringBuilder(128).append(from).append(tableName).append(where); fromStatement.append(COLUM

StringBuilder selectStatement = new StringBuilder(128).append("select").append(verbosity.getColumnSelectFragment());
StringBuilder fromStatement =new StringBuilder(128).append("from").append(tableName).append("where");

fromStatement.append(COLUMN.NAME.aliasAndName).append("like ? escape ?");

List params = new ArrayList();

params.add("%" + DB_ADAPTER.escapeAllWildcardsForLikeStatement(name) + "%");
params.add(DB_ADAPTER.getLikeEscapeSequence());
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn