When user post a message, he can select: allowed to see only friend, specific persons etc..
mysql table:
Post
post_id post_nr user_id privacy option
1 1 2 allowed for friend id1
2 1 2 allowed for friend id2
or
1 1 2 allowed for friends id1,allowed for friend id2 .?
How i can register in mysql multiple options(privacy) for one post?
The design of table is ok?
You can solve it by connecting a
privacy_optiontable to yourposttable.This way several friends can be listed per post and you can get a list of friend ids with a simple
JOIN. Make sure to markprivacy_option.post_idas a foreign key pointing topost.post_id.