码家

Web Platform, Cloud and Mobile Application Development

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2013年5月16日

摘要: 假定参数为: Int[] objs;......StringBuffer sql = new StringBuffer();sql.append("select * from table where id in(");for (int i=0; i<objs.length; i++) (i == objs.length-1) ? sql.append("?)") : sql.append("?,");PreparedStatement ps = conn.preparedStatement(sql.toString());for 阅读全文
posted @ 2013-05-16 22:32 海山 阅读(1519) 评论(0) 推荐(0)