have a problem with sql query (mysql 3.23)...
Two tables: groups and topics.
Groups table can be like that:
GroupID | Groupname
Topics table:
TopicID | Topicname | GroupID (foreign key from groups table)
Now want to select list of all the groups together with their topics
E.g.
Group1 Topic1
Group1 Topic2
Group2 Topic3
Group3 Topic4
Group3 Topic5
Group3 Topic6
....and max number of topics returned for each group is 3.
Two tables: groups and topics.
Groups table can be like that:
GroupID | Groupname
Topics table:
TopicID | Topicname | GroupID (foreign key from groups table)
Now want to select list of all the groups together with their topics
E.g.
Group1 Topic1
Group1 Topic2
Group2 Topic3
Group3 Topic4
Group3 Topic5
Group3 Topic6
....and max number of topics returned for each group is 3.