Currently, I have two MySQL tables.
First table stores relation between the friend and his picture.
TABLE 1
id | pic_id | friend_id
----------------------------
0 | 123 | 84589
1 | 290 | 11390
2 | 884 | 84589
TABLE 2
Second table stores more information about the pic…
id | pic_id | title | color | detail
----------------------------------------------
0 | 123 | hello | black | brush
1 | 124 | world | red | paint
2 | 884 | sample | green | star
I have my friend_id and need to grab all the pic_id from Table 1 and then use the pic_id to grab the columns from Table 2(title, color, detail)…
How would I do this in MySQL?
Thank you!
Simply join the two tables.