activerecord - Not Equal to Comparison in Codeigniter Active records -
i quite confused error receiving code
$this->db->order_by('uid','desc')->where('type!=',"admin")->get('user_profile',$config['per_page'], $this->uri->segment(3));
here error
error number: 1064 have error in sql syntax; check manual corresponds mysql server version right syntax use near ''admin' order `uid` desc limit 10' @ line 3 select * (`user_profile`) `type!=` 'admin' order `uid` desc limit 10 filename: c:\wamp\www\proposal\system\database\db_driver.php line number: 330
try query this. use single commas admin instead of double commas. , <> instead of !=
$this->db ->where('type <>','admin') ->order_by('uid','desc') ->get('user_profile',$config['per_page'], $this->uri->segment(3));
Comments
Post a Comment