On Jan 18, 10:16 am, Flipflops <[EMAIL PROTECTED]> wrote:
> Hi AD7six
>
> I like you answer - letting the database use CONCAT leaves your code
> nice and clean, how exactly are you suggesting to do it though?
Add it to your field list.
> Can you append it to the model in some way when you use a built in
> method (e.g. findAll)
Yup. see an example in here:
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/model/behaviors/tree.php
// see how MAX() is used.
> or were you suggesting creating a custom query
> function in the model and then calling that instead of a built in
> method (e.g. $this-->MyModel->MyQuery())
Nope.
> I've got a horrible suspicion that I've been writing a whole load of
> unnecessary code, or does this only apply to 1.2 (I've only used 1.1
> so far).
I doubt you are alone if that's true - if I don't know what's
possible, I go with what works, and then spend ages doing purist code
optimizations ;).
hth,
AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---