pogledaj Kohana Framework, taj update može biti jednostavan kao ovo...
PHP kôd:
public function action_update()
{
$id = $this->request->param('id');
if($this->request->method() == 'POST')
{
$post = ORM::factory('post', $id)
->values($this->request->post(), array('category_id', 'title', 'content'))
->save();
}
$post = ORM::factory('post', $id);
$categories = DB::select()
->from('categories')
->execute()
->as_array('id', 'title');
$post_view = View::factory('post.update', array(
'post' => $post,
'categories' => $categories,
));
$this->view->content = $post_view;
}