select gallery.id as id_gallery, gallery.id_product as id,product.title_main as title,gallery.img_edit as img,gallery.text as title_img, product.kod as code, CONCAT(product.direction,'page/',product.id,'-',product.name_en) as direction, gallery.id_sh as id_sh,gallery.text as user_text from product_gallery as gallery INNER JOIN product_main as product ON gallery.id_product=product.id WHERE gallery.id_product=:id_product and gallery.id_sh=:id_sh