SELECT `p`.`name` AS `pub_name`, `c`.`media_url` AS `cover_url`
FROM (
SELECT DISTINCT `publication_id`
FROM `tbl_publication_media`
WHERE `media_type` = 2
) AS `v`
JOIN `tbl_publication` AS `p`
ON `p`.`id` = `v`.`publication_id`
LEFT JOIN `tbl_publication_media` AS `c`
ON `c`.`publication_id` = `p`.`id` AND `c`.`media_type` = 4
localStorage.setItem('volume', ЗНАЧЕНИЕ);
localStorage.getItem('volume');