view raw
Abhishek Joshi Abhishek Joshi - 9 months ago 58
MySQL Question

defined method CI_DB_mysqli_result::where()

I am novice to CI and from documentation i have put the code but i am still getting an error...

Fatal error: Call to undefined method CI_DB_mysqli_result::where() in
on line 8
my model code is like these

class SuperUserLogin extends CI_Model{
public function checkinglogin($username,$password){
$password = md5($password);

return $row->row->admin_user_id();


Use CI's getWhere function.

$query = $this->db->get_where('mytable', array('id' => $id), $limit, $offset);