$sql = "SELECT tbl_img1.img1, tbl_img2.img2, tbl_img3.img3, tbl_img4.img4
FROM rel_tbl
INNER JOIN tbl_img1 ON rel_tbl.id_img1=tbl_img1.id_img1
INNER JOIN tbl_img2 ON rel_tbl.id_img2=tbl_img2.id_img2
INNER JOIN tbl_img3 ON rel_tbl.id_img3=tbl_img3.id_img3
INNER JOIN tbl_img4 ON rel_tbl.id_img4=tbl_img4.id_img4
ORDER BY img1 DESC ";