Thanks a lot, That saved the day :)
For reference, what worked was this set of parenthesis:
'((Modelname.foreign_id>0)) AS result'
/Martin
On Feb 11, 12:40 pm, grigri wrote:
> I haven't tried this in a while, but I seem to remember adding extra
> parentheses helped.
>
> Try these:
>
> '(Mod
I haven't tried this in a while, but I seem to remember adding extra
parentheses helped.
Try these:
'(Modelname.foreign_id>0 AS result)'
'(Modelname.foreign_id>0) AS result'
'((Modelname.foreign_id>0) AS result)'
'(((Modelname.foreign_id>0) AS result))'
One of them _should_ work
hth
grigri
On
Hi,
I am trying to order by a calculation (in a pagination) but my
calculation is being backticked to death. I can't find a way to write
this so that is works.
I have:
var $paginate = array(
'Modelname' => array(
'fields'=>array(
'Modelname.id',