CSDN博客

img miao_hong_bin

批量删除的一段代码。

发表于2004/10/13 14:01:00  438人阅读

OperationBo opBo = new OperationBo();
//  String key[] = request.getParameterValues("selected");
    String key[] = deleteform.getSelected();
   for (int m = 0; m < key.length; m++) {
    key[m] = opBo.JPToUnicode(key[m]);

   }

   String sqlDelete = "DELETE FROM MA_USER WHERE USERID IN('";

   for (int i = 0; i < key.length; i++) {
    sqlDelete += key[i] + "','";
   }
   sqlDelete = sqlDelete.substring(0, sqlDelete.length() - 2);

   sqlDelete += ")";

   return opBo.delete(sqlDelete);
  }

阅读全文
0 0

相关文章推荐

img
取 消
img