EllisLab text mark
Advanced Search
     
Query Binding doesnt work
Posted: 27 July 2009 02:01 PM   [ Ignore ]
Joined: 2009-07-25
41 posts

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)); 
 
Posted: 27 July 2009 02:13 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2006-11-08
231 posts

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