"This database needs to track how often a member has used the golf course, and how many guests any and each member has brought to the club."

^That is part of our case problem that I can't figure out how to do it. I'm done recording each member or guest who goes to the club, but I don't have an idea how will i track the member uses golf course and how many guests s/he invited.

Help me please :( I really need this. It's for our defense tomorrow. It's okay if you don't give me codes, just tell me what to do. That'll will help me a lot. Please

Recommended Answers

I would do it like this:
Keep your original table.
New table
visits
- visit_id (autoincrement int)
- no (FK) <--- refers to your original table
- visit_date (datetime)
- guest_count (smallint)

Then, for each visit, add a row to visits. You can then query visits for totals based on …

Jump to Post

All 4 Replies

Whare does the table already contain? Just add two more columns -- one to count the number of times the member uses the golf course and another to count the number of guests. When a member comes to the golf course look up is row in the table and increment the two columns.

the table contains information about the member such as: no (PK), name, mail, contact info, membership type. same with the guest.

what do you mean by "look up is row in the table and increment the two columns."?

this is how my records look like now. Still have the same problem.

I would do it like this:
Keep your original table.
New table
visits
- visit_id (autoincrement int)
- no (FK) <--- refers to your original table
- visit_date (datetime)
- guest_count (smallint)

Then, for each visit, add a row to visits. You can then query visits for totals based on date range, etc.

commented: good suggestion +14
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.