Hi,
I've got 3 tables with a 1:n relationship:
- author (has many books)
^
|
|
V
- books (belongs to categories) (has many authors)
|
|
V
- categories (has many books)
What I would like to do on one page, is show a categorized view of all
books by a specific author. The problem lies in the fact that each
category and each book also has some kind of sorting involved, which
states at what place in a category a book should be shown...
>From which Point of View should I query this, and am I able to
implement this in 1 query?
What I would like to end up with is the following array
array
category 2
book 1
name
blabla
book 3
name
blabla
book 2
name
blabla
category 1
book 4
name
blabla
book 6
name
blabla
book 5
name
blabla
The problem is, when I use findAll on Category, I'm not able to choose
how Cake should order the Books. Any workarounds?
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---