码迷,mamicode.com
首页 > 数据库 > 详细

拼接sql

时间:2014-12-16 14:56:16      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:ar   cti   amp   as   sql   br   type   table   string   

String whereArgs = taskTable + " where 1=1 ";

if (upCheck) {
whereArgs += " and type = 2 ";
}
if (gameID != null && !gameID.equals("0")) {
whereArgs += " and gameID = " + gameID;
}
if (searchProjectkey != null && !searchProjectkey.trim().equals("")) {
whereArgs += " and projectID like " + "‘%" + searchProjectkey
+ "%‘";
}
if (searchChannelkey != null && !searchChannelkey.trim().equals("")) {
whereArgs += " and channelName like " + "‘%" + searchChannelkey
+ "%‘";
}

拼接sql

标签:ar   cti   amp   as   sql   br   type   table   string   

原文地址:http://www.cnblogs.com/CaptainLin/p/4166927.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!