There are 2 tables in mysql. One stores information about the group, the other stores lists by group id.
SELECT * FROM `group`,`dialog` WHERE `group`.id = `dialog`.group_id LIMIT 50 This example displays as many groups as there are lists. It is necessary to display one group and the entire list for this group.
Tell me please.