Welcome Guest, Not a member yet? Register   Sign In
You must use the "set" method to update an entry.
#1

[eluser]Richievc[/eluser]
Hi all I having this weired problem

$status_data['] = '12';
$this->db->where(', $client_id);
$this->db->update(TABLE_CLIENTS,$status_data);
return this error: You must use the "set" method to update an entry.

I run the last query and it show this
echo $this->db->last_query();
UPDATE `client_profile` SET `status_in` = '12' WHERE `client_id` = '7617'

Note: there are other queries with inthis function can that be hurting the update the var is unique tho

any help is thankful richievc
#2

[eluser]mi6crazyheart[/eluser]
If u want to UPDATE then try this example...
Code:
$this->db->set('userFname', $fname);
$this->db->set('userLname', $lnameP);
$this->db->where('client_id', $clientId);
$this->db->update('users_info');

userFname,userLname : DB table fields
$fname, $lname : data which u'll get from users by html form
users_info : DB table name

Ref: http://ellislab.com/codeigniter/user-gui...tml#update




Theme © iAndrew 2016 - Forum software by © MyBB