Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
'like' argument
  • HI I would like to do the following query "DB::query('SELECT * FROM annuaires WHERE nom like "A%"');" with orm model can someone tell me how to do it? I can't find it in the doc
    Model_Annuaire::find('all', array('where' => array('nom'=> 'A%')));
    thank you
  • Possible with the ORM as well as with the QB: Model_Annuaire::query()->where('nom', 'LIKE', 'A%')->get(); or Model_Annuaire::find('all', array('where' => array(array('nom', 'LIKE', 'A%')))); or for the QB: DB::select()->where('nom', 'LIKE', 'A%')->execute();
  • thank you for your help
  • The possible operators should be in the docs I think.

Howdy, Stranger!

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

In this Discussion