On 1/25/07, Anggie Bratadinata <[EMAIL PROTECTED]> wrote:
>
> Model->findBySql($sql)
>
> --

C'mon now, that's cheating...

Step one is for you to define your models
Step two is for you to define the associations between the two models
so you can use the nicely formatted results array.
Step three is to start messing around with passing selection criteria
via your model->find() method.

Sure, you can use findBySql but the resulting array is coyote-ugly.
Less work to setup, but one should always strive for elegance in your
code.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

rallyhat.com - digitial photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to