CodeIgniter Forums

Full Version: db->update error: You must use the "set" method to update an entry.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]stormbytes[/eluser]
I'm trying to update an entry in a database using:

Code:
$row = array('id' => '5', 'name' => 'john');

$this->db->where('id', '5');
$this->db->update($row);

And it's returning this error:

You must use the "set" method to update an entry.

El Forum

[eluser]stormbytes[/eluser]
Bah! Forgot the table name in the update stmt. I need to stop working so late!

El Forum

[eluser]wiredesignz[/eluser]
Yeah, you do! Smile