Kohana3 ORM save problem
Posted
by Bob0101
on Stack Overflow
See other posts from Stack Overflow
or by Bob0101
Published on 2010-05-07T08:14:58Z
Indexed on
2010/05/07
8:18 UTC
Read the original article
Hit count: 301
Hi,
Can anyone help me with Kohana ORM. I can take out name and value. I can give them new values and I try to save them back to base, but in phpmyadmin i can see still old values for these option attributes. What is wrong with this code (it works and echos right value but i can't see it in db):
$option = ORM::factory('draft')
->where('user_id', '=', $user_id)
->find()
->draft_options
->where('name', '=', $_POST['name'])
->find();
$option->name = $_POST['name'];
$option->value = $_POST['value'];
$option->save();
if ($option->saved()) echo Kohana::debug($option->value);
© Stack Overflow or respective owner