Welcome Guest, Not a member yet? Register   Sign In
Message: Call to a member function row() on boolean
#1

Hey guys, took me the entire week to get familiarise with your CI FrameWork. However been having an issue with fetching and inserting data into the sqli database... I checked the Database connectivity config file and it seems fine.

anyways this is my issue below:
----------------------------------------------------------------------------------------
An uncaught Exception was encountered
Type: Error

Message: Call to a member function row() on boolean

Filename: /application/models/Login_model.php

--------------------------------------------------------------------------------------
and this is my code:

<?php

class login_model extends CI_Model
{
function cek_login($where)
{

$this->db->order_by('user_name', 'DESC');
print_r($this->db->get_where('admin', $where)->row());
$query=$this->db->get_where('admin', $where)->row_array();

$data = array();
if($query !== FALSE && $query->num_rows() > 0){
foreach ($query->result_array() as $row) {
$data[] = $row->row_array();
}
}

return $data;

}
}
----------------------------------------------------------------------------------------------------
anywayz hope someone out there with enough experience isĀ able to really help me solve this.
Reply


Messages In This Thread
Message: Call to a member function row() on boolean - by gelson - 11-23-2020, 05:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB