Abhishek Joshi Abhishek Joshi - 1 year ago 121
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();

Answer Source

Use CI's getWhere function.

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download