Hello,
I have to query information that spans 3 tables. I was playing around on MS access and got it to wrok there, but when I copied the SQL code, it stopped working.
I have the following 3 tables (simplified):
Events:
EventID
GroupID
EventName
* .... (more info)
Groups:
GroupID
GroupName
GroupTypeID
Group_types :
GroupTypeID
Name
So I want to display all events that are being done by any group but that group must match a certain group type. All I need to display are the EventID and EventName:
$result = mysql_query("SELECT events.GroupID, events.EventID, events.EventName, group_type.GroupTypeID, groups.GroupID FROM (group_type INNER JOIN groups ON group_type.GroupTypeID = groups.GroupTypeID) INNER JOIN events ON groups.GroupID = events.GroupID ORDER BY events.EventDate",$db);
Thanks