I like these ideas, but the solution should be simpler than this. If I had
written:

}else{     //line 1021
   $options['order'][$field] = $value;
}

the ordering in pagination should work correctly. The only objective of that
code in the other email is to avoid sql injections, because $value will be
concatenated in the query like: ".... ORDER BY model.$value ...". In my
opinion, Cake should handle this automatically.

Thank you

2010/5/22 WebbedIT <[email protected]>

> If you are regularly sorting fields by aggregate values then it may be
> a lot more efficient to add those as real fields into the database
> which are calculated afterSave and afterDelete as will save a lot of
> extra database work in the long run.
>
> HTH
>
> Paul.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to