I want to search in two tables Input: User-ID ... Output: path
tabel1
tabel2
User-ID|Name|b1|b2|b3|b4 0 |Per |1 |0 |1 |0 1 |Lisa|1 |1 |1 |1
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:
User-ID|Name
0 |Per
1 |Lisa
Pic|path
1 |"pics/001.jpg"
2 |"otherpics/003.jpg"
3 |"pics/002.jpg"
User-ID|Pic-ID
0 | 1
0 | 3
1 | 1
1 | 2
1 | 3