Welcome Guest, Not a member yet? Register   Sign In
Query Binding doesnt work

Hi Guys

Everytime I try to do query binding the queries are never executed, be it insert,update or select. Does anyone know how I can fix this ?

$sql_update_login = "UPDATE admin_users SET ip_address=?, last_login=NOW() WHERE id=?";
$this->db->query($sql_update_login, array(2, $ip, $id));

You're trying to bind to 2 params but passing 3 variables in, drop the 2 from your array.

Theme © iAndrew 2016 - Forum software by © MyBB