Newb question about lists
Posted: Mon Nov 30, 2009 5:20 pm
Hi all,
The site I'm building is an online learning resource with 10 courses for members to take and complete
in any order they choose.
I have a table "myMembers" which holds member details like first and last name, email, p'word,
date joined and last log on date.
I need a way of recording which members have signed up to which courses and can't
quite get my head around how to approach it.
Do I make a new table called "courses" with ten fields listing each course and then enter the data
against each course - or - put a new field in the members table to list which courses they've
signed up to ? (preferred but I have no idea how to hold a list in a field in the db)
So I guess my question is about how to hold lists on the db - it's always the way, writing it out helps
to clarify the question I actually need to ask!
Could a field in the members table hold a list such as "1,5,9,6" to indicate that the member had signed
up to those courses in that order?
Or could the table "courses" hold a list of members (who are identified by number) who have signed up
to that course ?
i.e.
course1 = 22,99,108,4,66
course2 = 33,44,6,1,987
Any pointers / links / lessons on this very gratefully received !
Best wishes
Monty
The site I'm building is an online learning resource with 10 courses for members to take and complete
in any order they choose.
I have a table "myMembers" which holds member details like first and last name, email, p'word,
date joined and last log on date.
I need a way of recording which members have signed up to which courses and can't
quite get my head around how to approach it.
Do I make a new table called "courses" with ten fields listing each course and then enter the data
against each course - or - put a new field in the members table to list which courses they've
signed up to ? (preferred but I have no idea how to hold a list in a field in the db)
So I guess my question is about how to hold lists on the db - it's always the way, writing it out helps
to clarify the question I actually need to ask!
Could a field in the members table hold a list such as "1,5,9,6" to indicate that the member had signed
up to those courses in that order?
Or could the table "courses" hold a list of members (who are identified by number) who have signed up
to that course ?
i.e.
course1 = 22,99,108,4,66
course2 = 33,44,6,1,987
Any pointers / links / lessons on this very gratefully received !
Best wishes
Monty