You can use $this->Model->query();
However, it won't return any dependent models with it.

http://manual.cakephp.org/chapter/models

On Sep 13, 12:03 pm, Mike Green <[EMAIL PROTECTED]> wrote:
> Hi folks
>
> I want to query two tables at the same time, mysql lets me do this
> with:
>
> SELECT name,age  FROM football
> UNION
> SELECT name,age FROM baseball
>
> which will produce something like this:
>
> name    age
> John    20
> Alex    21
> Robort  23
> Reid    16
> Greek   19
>
> ( shamelessly stolen fromhttp://www.plus2net.com/sql_tutorial/sql_union.php
> - linked to get a better idea of what im trying to achieve )
>
> I have two tables, each identical schema, but with data from different
> places. I need to either create something that will override the
> default "findall" function, or do something clever with the paginator
> as the results *must* be shoved through the paginator.
>
> I'm not fussy about the overhead, if it takes 10 minutes to return the
> results, then thats fine.
>
> At the moment, I perform two queries, one on model1 and one on model2,
> and then join the results with some php array management, then shove
> that through my view, although obviously this doesnt make use of the
> great cake 1.2 paginator..
>
> all and any ideas appreciated.
>
> Mike


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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