Re: Help with calculated field being backticked to death

2009-02-11 Thread Martin Westin
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

Re: Help with calculated field being backticked to death

2009-02-11 Thread grigri
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

Help with calculated field being backticked to death

2009-02-11 Thread Martin Westin
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',