I don't think there is a very cakeish way to do this, of course you could
use a UNION statement in your sql query but then you wouldn't get any of the
benefits from the ORM.

On Thu, Oct 29, 2009 at 5:23 PM, ge...@dinnerbooking.com <
ge...@dinnerbooking.com> wrote:

>
> I have two tables:
>
> houses
> houses_stat
>
> The two tables are the same but old data from "houses" are moved to
> "houses_stat" by a cron job.
>
> Now I want to find all houses in both tables where "price" equals
> "1000"
>
> A find in one table would be:
> $houses->find("all", array("conditions" => array("price" => 1000)));
>
> but how do I lookup data in both tables in one find?
>
> How do I do that?
>
> Do I need to use some kind of bindModel  or?
> >
>

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

Reply via email to