Hi,
I set up the following conditions in the model:
<code>'conditions' => array(
'where' => array(
array('ar', '>', '0')
)</code>
But it escapes the zero and produces this:
<code>ON (`t0`.`termekkod` = `t3`.`bcikkszam` AND `t3`.`ar` > `0`)</code>
Sure it doesn't find the 0 column.
How can I fix this?
Thanks,
Mark
Hi,
I couldn't solve my actual problem, so I ask for help.
I have a model which has many related to another (so it belongs to). When I query the main model I want to have the only row from the has many related model which's specified column is not null and is the minimum value.
So :
Main model:
id
productcode
etc
Price model:
id
productcode
seller
price => can be 0 if the seller doesn't have it, and I want to show the smallest which is not null.
How can I do it with models?
I must do it in one query, because I show only those products, which has a price and not null.
Thanks,
Mark