fuel_model example

Is there a thorough example on how to use the fuel_model with the various options and when to use those options? I'm using this to get a single client
$client = fuel_model('clients', array('find' => 'all', 'where' => array('id' => 1)));

That loads it into an array and I need just a single object. I tried
$client = fuel_model('clients', array('find' => 'one', 'where' => array('id' => 1)));
and that didn't work. So if I could find an explanation or more examples I think that would help

Comments

  • 'find' => 'one' should return one result. What are you seeing instead?

Sign In or Register to comment.