如何声明在codeigniter中不选择多个ID
我不想被选中的ID,我尝试了这个代码,但它没有工作如何声明在codeigniter中不选择多个ID,codeigniter,Codeigniter,我不想被选中的ID,我尝试了这个代码,但它没有工作 $this->coredb->select("u.id, username, email, firstname, lastname, email_signature"); $this->coredb->join("core_utypes cu", "cu.id = u.id", "left"); $this->coredb->where("(cu.utype = 3 OR u.utyp
$this->coredb->select("u.id, username, email, firstname, lastname, email_signature");
$this->coredb->join("core_utypes cu", "cu.id = u.id", "left");
$this->coredb->where("(cu.utype = 3 OR u.utype = 3)");
$this->coredb->where("(cu.utype = 6 OR u.utype = 6)");
$this->coredb->where("status", 1);
$ids = ("89, 108, 49, 109, 38, 54, 87, 90, 104, 74, 99, 111, 87, 84, 94");
$this->coredb->where("u.id NOT IN", $ids);
$this->coredb->order_by("u.lastassigned", "asc");
$query = $this->coredb->get("core_users u");
return $query->row_array();
如果要使用
WHERE IN
,则需要使用->WHERE\u IN
或->WHERE\u not\u IN
$ids = array(89, 108, 49, 109, 38, 54, 87, 90, 104, 74, 99, 111, 87, 84, 94);
$this->coredb->where_not_in("u.id", $ids);
文件: