update
Update a new record.
Usage:
$db->{table}->update($where, $data);
$news = $db->news->update(
array('id' => 1),
array('name' => 'Updated name')
);
// or
$news = $db->news->update(
1, // WHERE 1 is your primary ID
array('name' => 'Updated name')
);
Return:
{
"id": "AUTO_GENERATED_ID",
"name": "Updated name",
"status": "ACTIVE",
"created_at": "2024-11-03 21:07:37",
"updated_at": "2024-11-03 21:07:37",
"deleted_at": null
}
Looking for the other parameters?
ParametersLast updated