Hi, I was wondering if somebody could give me some pointers on how to accomplish something:
I am designing a mountain bagging list for an outdoor society so that members can come along and tick a checkbox to say that they have climbed a certain mountan.
I have three related tables that are relevant to this project:
Users - has userEmail as the Primary Key and then other details.
Mountains - has a Auto Incremented integer as the primary key and then info such as the height of the mountain, its name etc.
Bags - this has an Auto Incemented integer as its primary key and then the primary keys of the Users and Mountains as Foreign keys. Finally there is a BIT to say whether a user has bagged that mountain, and also a longtext field so people can leave a messgae on their experience of that Bag.
On my PHP page I want to display all the mountains in a list, with Name, Height etc displayed for each name, plus a check box so people can click to say whether they have done it.
I also want to have a total for each mountain on how many people have actually bagged that mountain, and also how many people have left comments. I can't work out how to manage this part in a single query. is this possible?