@Cale: Cake has some more automagic goodness that helps with this
situation perfectly.

http://book.cakephp.org/view/816/counterCache-Cache-your-count

Let cake automatically keep a count of vote counts and store them in
the object being voted on, this means your doing less database calls
as you only update the count when a vote is made and you can easily
order the object results by number of votes etc.  No need to call a
count query in your view, just pull the parent object record and the
count is there and no need to loop through your index running extra
counts.

HTH

Paul.

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to