Question

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();

Was it helpful?

Solution

  1. You can use $user->loaded(). Please review Unofficial Kohana 3.0 Wiki for more resources and tutorials.
  2. Is this your whole code?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top