Welcome Guest, Not a member yet? Register   Sign In
Update multiple rows in a table
#2

[eluser]stuffradio[/eluser]
Code:
$data = array(
               'title' => $title,
               'name' => $name,
               'date' => $date
            );

$this->db->where('id', $id);
$this->db->update('mytable', $data);

// Produces:
// UPDATE mytable
// SET title = '{$title}', name = '{$name}', date = '{$date}'
// WHERE id = $id

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


Messages In This Thread
Update multiple rows in a table - by El Forum - 08-19-2008, 01:41 AM
Update multiple rows in a table - by El Forum - 08-19-2008, 01:45 AM
Update multiple rows in a table - by El Forum - 08-19-2008, 01:56 AM
Update multiple rows in a table - by El Forum - 08-19-2008, 02:52 AM
Update multiple rows in a table - by El Forum - 08-19-2008, 03:21 AM
Update multiple rows in a table - by El Forum - 08-19-2008, 04:07 AM
Update multiple rows in a table - by El Forum - 08-19-2008, 04:32 AM
Update multiple rows in a table - by El Forum - 08-19-2008, 05:14 AM
Update multiple rows in a table - by El Forum - 08-19-2008, 07:31 AM
Update multiple rows in a table - by El Forum - 08-19-2008, 07:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB