Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
mysql functions
  • Hello!
    Is it possible to use orm with querys like for example:? "select * from pages where month(publish_date) < 5"; if yes how to do this, because this won't work: Model_Pages::find('all',array('where'=>array('MONTH(publish_data)','<',5)));
  • Model_Pages::find('all',array('where'=>array(DB::expr('MONTH(publish_data)'), '<', 5)));

    It won't get quoted if you put it inside a Database_Expression object, which you can do by passing it through the DB::expr() method.

Howdy, Stranger!

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

In this Discussion