Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何声明在codeigniter中不选择多个ID_Codeigniter - Fatal编程技术网

如何声明在codeigniter中不选择多个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

我不想被选中的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.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); 
文件: