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 from http://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 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