An alternative way which might scale better would be to have your
posts table, your users table, and a posts_users table, joined using a
hasAndBelongsToMany association. That way you don't get those comma-
separated values, which are a complete bitch to deal with if you ever
want to access them using a JOIN condition.

Tufty

On Dec 21, 5:22 pm, steve <[EMAIL PROTECTED]> wrote:
> I have a discussion board (kind of like mini discussion board), where
> users can subscribe to a particular Post ( so that when there is a
> reply to this post, they get mailed a notification ).
>
> I'm deciding whether or not to store it this way:
>
>             posts table
> post_id          users_subbed_to_post
> ----------          -----------------------------------
> 4                   2,15,23
> 7                   11,8
> 34                 8,12,16
> 234               1,2,6,10,15
>
>                  --  or --
>
>           users table
> user_id          posts_subbed_to
> ----------          -----------------------------------
> 1                   234
> 2                   4, 234
> 8                   7, 34
> 11                 7
>
> The first way, makes it a no-brainer whenever a new reply to that
> original post is created. You can easily get all of the subscribed
> users to that post and call mail() for each one.
>
> But the second way seems more logical somehow.
>
> I figured maybe one or more of you might have cakePHP website based on
> the blog tutorial and come across the same decision-point.
>
> Happy Holidays,
> Steve
--~--~---------~--~----~------------~-------~--~----~
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