I have just coded my own basic "community" type of portal for one of my sites.
You can check my profile out here: http://www.youtubetomp3.net/profile/admin
I am currently in the process of coding a forum for it, after this I want to make a type of "friend-system".
I want it to work so say somebody goes to my profile (link above), there is a link which says Add as Friend, and it then adds me to their friends list.
I know how to do all of this, but I have never had any experience in storing mutiple values in one field, for example:
User ID 4 adds me (user id 1), someone else, (id 5) and someone else, (id 80).
I want to store that in 1 field, for example 1,5,80 - as it'd be more efficient, but I'm not sure the best way to do this, nor select the results as single values.
UserID : 4
Friends: 1,5,80
My user id field is called "id", thats all that should be needed really, haven't created the friend field yet.
Thanks in advance, very appreciated
If you don't understand something, let me know.![]()







Putting multiple values in one field is a clear sign of a non normalized database design.


Bookmarks