Welcome Guest, Not a member yet? Register   Sign In
Jamie Rumbelow's Flare O/R Mapper for CI - anybody playing around with it?
#2

[eluser]peterphp[/eluser]
Hi,

I just wanted to update my post with my last findings which are are workaround for my point 2) and a solution for 3).

Solution for 3):

Code:
$options = array(
             'select'     => 'column3, column5, column7'
             'from'       => 'myTableName',
             'conditions' => array('column3' => 'mySearchTerm'),
             );

$this->data['post'] = Customer::find('all', $options);

// alternative short form
$this->data['post'] = Customer::all($options);

with:
model: customer_model (that's what "Customer::" refers to).

"conditions" within the options-array creates a where statement in the resulting sql.


Workaround for 2):

Well, I now just use the "from"-option above.


Hope that's helpful for someone.

Again, IMHO Jamie delivered a *brilliant* piece of code with Flare, congratulations to that!


Messages In This Thread
Jamie Rumbelow's Flare O/R Mapper for CI - anybody playing around with it? - by El Forum - 12-17-2009, 02:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB