Hi,

On Sep 22, 5:28 pm, benr <[EMAIL PROTECTED]> wrote:
> I'm looking for a way for an admin to get get all the recent activity
> across multiple content types in one large list.
>
> I have multiple tables containing different content types (subpages,
> news, events, etc) all of which have similar fields (name, crated,
> status, user_id).  Is there a way to find all the most recent activity
> from those tables and combine the results into one large list that is
> sorted by created date?
>
> I'm not sure if I'm missing something obvious that cake has already
> built in or if I will just need to do an array merge or something.

As for there being a native cakephp to do it, I can't really tell.

For complicated things, I tend to resort to plain SQL to let the
DBMS handle (and optimize) the request.
A single SQL request with UNION's and ORDER BY called by
a query() call will fetch and order everything you need.

There may be also some cleaner solutions with SQL "advanced"
structures (views, ...) but I would need to check how that's
supported in cake (it may also add a dependency
on your DBMS).

Of course, if someone as a simple cakephp-native method,
I'd like to know too :-)

Regards,
--
Pierre


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