I have the below query form using codeigniter active record function,
select * from user where user_id!=10
I have tried the below code
$condition=array(
'userr_id!='=>2,
);
$this->db-get('userd',$condition);
its return database error. How to make query using active record function?
Try this one
$this->db->where("your_id !=",$your_id);
Try this:
$this->db->where("your_id <> ".$your_id);
<>
refers to NotEqual in SQL.
$condition=array(
'user_id !='=>$id
);
$this->db->get('users',$condition);
or
$this->db->where("user_id !=",$id);