[eluser]grolle[/eluser]
Hi,
I'm using this in a function of an own lib to identify an user, but I get no result:
Code:
$sql = "SELECT * FROM ci_users WHERE username = '".$username."' AND active = 1 LIMIT 1";
$query = $this->CI->db->query($sql);
Code:
print_r($query->result());
returns an empty array.
shows that there are zero num_rows.
If I do
Code:
print_r($this->CI->db->last_query());
and execute the query via phpMyAdmin everthing works fine and I get one row.
Whats wrong with this code?
Best regards...