Monday, April 26, 2010

Containable pagination query

Hey all,

I've almost reached the end of application and this last little bit is really getting to me!

Can anyone shed some light?

Models:
Submission hasMany Judging which belongsTo Judge (and submission)

The submissions are entries submitted by students.
Judgings stores each judges scores they have entered for each submission. (score_originality, score_overall, score_objective, score_technical)
Judges stores each judges info.

Submission table contains a semifinalist tinyint.
Judging contains a disqualified tinyint.

What I'm trying to do is perform a query to fetch all the submissions and the total score as well as the number of judges that judged that submission.

Then I also need to fetch the top25/top50/top100 scoring submissions as well as the number of judges+total score.

I've tried every combination of containable I can think of but I'm about to pull my hair out here...

thanks guys!

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: