This problem involves three of my database tables:
user- a list of all users of web app
event - a list of events users can sign up for
eventdet- table with two columns: userid and eventid. intended to keep track of who has signed up for which event.
Here's the question: I want to display a web page that will list all events and the number of users currently signed up for each one.
My query at the moment is this:
SELECT eventid,eventtitle FROM event;
I want to end up with something like this:
SELECT eventid,eventtitle,COUNT([SELECT * FROM eventdet WHERE event.eventid = eventdet.eventid])
Any advice?
--
All table and column names have been changed to protect the innocent.