Pergunta
Kohana3 ORM newbie here.
I got few fast questions:
I got a following code
$user = ORM::factory('user')->where('key', '=', $key)->find();
. IT's working correctly however... How to check if the query return anything?When I'm trying to update, new record is being instered. Why?
$user->status = '1'; $user->save();
Solução
- You can use $user->loaded(). Please review Unofficial Kohana 3.0 Wiki for more resources and tutorials.
- Is this your whole code?
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow