So here's the problem I'm having. I have two separate tables TableA and TableB, TableA has four columns and TableB has two. TableA holds only ids while TableB holds id and string. So I need strings from TableB but based on the ids from TableA
For example:
TableA:
+------+------+-------+------+
| m_id | appi | mainy | desy |
+------+------+-------+------+
| 1 | 6 | 9 | 13 |
+------+------+-------+------+
| 2 | 7 | 10 | 14 |
+------+------+-------+------+
| 3 | 8 | 12 | 15 |
+------+------+-------+------+
TableB
+------+-------+
| t_id | str |
+------+-------+
| 6 | dude |
+------+-------+
| 10 | bro |
+------+-------+
| 9 | lol |
+------+-------+
| 14 | homie |
+------+-------+
Based on the tables above I need to find out the actual strings based on the ids from TableB, something like SELECT str FROM TableB WHERE t_id = (Ids from TableA WHERE m_id=1). So my expected data should be 'dude' and 'lol' because m_id=1 has two ids 6 and 9, and those ids in TableB have strings 'dude' and 'lol'. I would really appreciate any help and sorry if there's any confusion, please let me know and I'll try to address that.