I'm using cake1.2 rc2.

I have a table called A and A has one or many children in table B or
C. So B and C both have foreign key, A_id. And A only has children in
either B or C (can't have in both).

I want to create an index page that show A has children in B and an
index page that show A has children in C but i don't know how.

SQL will be like:
SELECT A.* FROM A, B WHERE A.id=B.A_id AND COUNT(B.id) > 0
to show A has children in B.

I set this condition, COUNT(B.id) > 0 in $this->paginate() but however
I set the relation in models or change recursive, child tables doesn't
seem to be read in paginate(). Related children seem to retrieve later
using WHERE IN ().

Is there any way to do this?



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