Welcome Guest, Not a member yet? Register   Sign In
Why are row_array() and row() not working?
#1

I have encountered an issue with fetching user data in CodeIgniter using a library function. The row_array() or row() functions are not working as expected. However, when I print the $this->CI->db->last_query() function, the query appears to run properly inside phpMyAdmin. Below is my code:


$result = $this->CI->db->select('`id`, `firstname`, `lastname`, `username`, `email`, `access`')
            ->from('HM_admin')
            ->where(array('username' => $username, 'password' => md5($password)))
            ->get()
            ->row_array();

echo $this->CI->db->last_query();
echo '<pre>';
print_r($result);
exit;
I need assistance in resolving this issue.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB