$UserID=join(",",$_POST[UserID],); $sql="delete from tb where UserID IN(".$UserID.")";
if (count($HTTP_POST_VARS["checkbox1"])>0) { $strSQL=""; for ($intCount=1; $intCount<=$HTTP_POST_VARS["checkbox1"]; $intCount=$intCount+1) { if ($HTTP_POST_VARS["checkbox1"][$intCount]!=""){ $strSQL=$strSQL."DealID=".$HTTP_POST_VARS["checkbox1"]." or ";//取复选的值,为什么只是最后一个值,怎样才能把复选的值都带出来呢??? } ; }
function removeUser( $userId )
{
if( $userId )
{
$removeUserSQL = "DELETE from`" . TABLE_USERS . "` WHERE user_id IN (" . $userId .")";
return $this->db->query($removeUserSQL);
}
else
{
return false;
}
}
--------------------------------
if($User->removeUser(@implode(', ', array_keys($_POST[remove]))))
{
$GF->jumpPage(SELF_URL.'CH=userList','操作成功','成功删除指定用户。');
}
else
{
$GF->jumpPage(SELF_URL.'CH=userList','操作失败','删除指定用户失败,请确认!');
}
$sql="delete from tb where UserID IN(".$UserID.")";
{ $strSQL="";
for ($intCount=1; $intCount<=$HTTP_POST_VARS["checkbox1"]; $intCount=$intCount+1)
{
if ($HTTP_POST_VARS["checkbox1"][$intCount]!=""){
$strSQL=$strSQL."DealID=".$HTTP_POST_VARS["checkbox1"]." or ";//取复选的值,为什么只是最后一个值,怎样才能把复选的值都带出来呢???
}
;
}
$strSQL=substr($strSQL,0,strlen($strSQL)-4);
$strSQL="DELETE FROM newcontacts WHERE ".$strSQL;
$cnnDBEdit=mysql_connect("localhost","root","");
mysql_select_db("weblog",$cnnDBEdit);
mysql_query($strSQL,$cnnDBEdit)or die("Invalid query:".mysql_error()); mysql_close($cnnDBEdit);
$cnnDBEdit=null; } }