Pergunta

Kohana3 ORM newbie here.

I got few fast questions:

  1. 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?

  2. When I'm trying to update, new record is being instered. Why? $user->status = '1'; $user->save();

Foi útil?

Solução

  1. You can use $user->loaded(). Please review Unofficial Kohana 3.0 Wiki for more resources and tutorials.
  2. Is this your whole code?
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top