Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Incorrect example in Model_Crud documentation?
  • In the `save()` example (http://docs.fuelphp.com/classes/model_crud/methods.html#/method_save), shouldn't this: `$user = Model_User::forge()->set(array(` be: `$user = Model_User::forge(array(` Rich
  • No, both syntaxes lead to the same result, we don't promote one over the other so the examples use both.
  • Then I have a problem with my installation, because only the second example worked. Also Model_Crud::find works but Model_Crud::find_by doesn't. I keep getting errors like: array_key_exists() expects parameter 2 to be array, string given in /fuel/packages/orm/classes/model.php on line 564 Any suggestions what that might be? Rich
  • For instance the following code: Model_ApiKey::find_all() results in: Error - SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.' in 'where clause' with query: "SELECT `t0`.`id` AS `t0_c0`, `t0`.`name` AS `t0_c1`, `t0`.`key` AS `t0_c2`, `t0`.`created_at` AS `t0_c3`, `t0`.`updated_at` AS `t0_c4` FROM `api_keys` AS `t0` WHERE `t0`.`id` = '0' AND (`t0`.`` IS null) LIMIT 1" in COREPATH/classes/database/pdo/connection.php on line 137 What am I doing wrong?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion