mysql - matching groupmembers against another group and add its name to the first -
i need take members of each group in table_a , in table_b if there 1 or more groups exact same members if ad resulting groupnames result. table_a holds groupmembers: +-------+----------+--------+-------+ |uniqeid|objectname|property|value | +-------+----------+--------+-------+ |0 |thing1 |color |grey | +-------+----------+--------+-------+ |1 |thing1 |hardness|100 | +-------+----------+--------+-------+ |2 |thingy |sofness |80 | +-------+----------+--------+-------+ |3 |thingy |color |brown | +-------+----------+--------+-------+ |4 |thingy |emits |gas | +-------+----------+--------+-------+ |5 |item |exists |1 | +-------+----------+--------+-------+ continues endless data kinds of propertys , objectnames. table_b basicaly same holds objecttypes groups in table_a +-------+----------+---------+ |uniqeid|objecttype|property | +-------+----------+---------+ |0 |stone |color | +-------