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