I’m using a MYSQL database.
I have the following:
tbl1
ID(p) | FID(p)
1 7
2 7
2 8
7 2
3 9
tbl2
DATA(p) | ID(f)
AAA 7
BBB 7
CCC 8
I need to select ALL FID where ID = 2 from tbl1 (7, 8)
I then need to select all DATA where ID = the results of the first query (returning AAA, BBB, CCC)
Can this be done in one query, or two? If you can point me in the direction of the right operator I can work it out.
Thanks!
Will return: