SELECT
					sn.`id`, sn.`ransom`, r.`purchase`, p.`activeransom`, r.`status` "ransom_status", r.`currency` "ransom_currency", r.`rate` "ransom_rate",
					sn.`n`, sn.`category`, sn.`name`, sn.`descr`, sn.`price`,
					GROUP_CONCAT(photo.`name` ORDER BY photo.`id`) "photo",
					sn.`noorder`, sn.`complete`, sn.`notavailable`, sn.`disable_unorder`, sn.`extension`, sn.`positions`,
					sp.`id` "pos_id", sp.`title` "pos_title", sp.`orderid`, o.`userid`, prof.`username`, o.`status`, o.`dateadd`, prof.`blacklist`
				FROM `series_new` sn
				INNER JOIN `ransom` r ON (sn.`ransom` = r.`id`)
				INNER JOIN `purchase` p ON (r.`purchase` = p.`id`)
				LEFT JOIN `series_photo` sphoto ON (sphoto.`seriesid` = sn.`id`)
				LEFT JOIN `photo` photo ON (sphoto.`photo` = photo.`id`)
				LEFT JOIN `series_position` sp ON (sp.`seriesid` = sn.`id`)
				LEFT JOIN `orders` o ON (sp.`orderid` = o.`id`)
				LEFT JOIN `profile` prof ON (o.`userid` = prof.`userid`) 
				WHERE sn.`ransom` = 337924
				GROUP BY sn.`n`, sp.`id`
				ORDER BY sn.`n`, sp.`id`

---------------------
162.158.79.60 15.07.2020 05:14:16  //sp2.bvf.ru/view/337924.html