Hi!
I’m creating a website using PHP and MySQL which is going to enable me to create events, and then link users I register to them. I want to be able to have one person registered to multiple events.
Currently I’ve thought about two ways of doing this.
[LIST=1][]Having the party-table contain a field with the participants listed like this: “1,3,6,9,14,23…” with the userids of all the people, and then getting all of the users in a second query or something.
[]Having a field on each participant like above, but with the partyid instead. And then just filtering those with the party-id out.
[/LIST]
As of this moment, I like the second one the best (obviously), but is there a better method of achieving this? I don’t really like to store the values separated with commas. I guess I can store PHP-arrays, but isn’t there a SQL-function or something maybe I can use?
Does anyone have any suggestions or tips on how something like this can be done?
Appreciate it.
-Eikern