从2个表中选择数据

I want to search in two tables Input: User-ID ... Output: path

tabel1


User-ID|Name|b1|b2|b3|b4 0 |Per |1 |0 |1 |0 1 |Lisa|1 |1 |1 |1
tabel2
Pic|path
b1 |"pics/001.jpg"
b2 |"otherpics/003.jpg"
b3 |"pics/002.jpg"

I want to use MySQL with PHP
Exampel: User-ID=0(SELECT...)Output="pics/001.jpg","pics/002.jpg"

Thanks for your Support

Normalize your tables properly:

tabel1 (Users)

User-ID|Name
     0 |Per 
     1 |Lisa

tabel2 (Pics)

Pic|path
1 |"pics/001.jpg"
2 |"otherpics/003.jpg"
3 |"pics/002.jpg"

tabel3 (User_Pics)

User-ID|Pic-ID
0 | 1
0 | 3
1 | 1
1 | 2
1 | 3