I have to tables, "stories" and "comments".  They have a relationship

story has many comments.
comment belongs to story.


In stories, I have a field named "visiblecomments"  (yes it's long ;)

I want to return only a number of comments (that is defined in
"visiblecomments") in every story.

Example:

Story 1:

id: 1
title: this is first story.
visiblecomments: 2
has 4 comments.

Story 2:
id: 2
title: this is second story
visiblecomments: 1
has 5 comments.

I want it to return the following:

2 comments from the first story and 1 comment from the second story.

hope that made any sense..

-thanks

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