0

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

4

1 回答 1

0
  1. You can use $user->loaded(). Please review Unofficial Kohana 3.0 Wiki for more resources and tutorials.
  2. Is this your whole code?
于 2011-01-11T10:08:58.707 回答