SELECT a.id,a.template,a.columns,a.headers_group,z.code,z.code_en,c.name,DAYOFMONTH(a.startdate) as startdate_day,MONTH(a.startdate) as startdate_month,YEAR(a.startdate) as startdate_year,DAYOFMONTH(a.enddate) as enddate_day,MONTH(a.enddate) as enddate_month,YEAR(a.enddate) as enddate_year,(SELECT d.text FROM structure_toc_texts d WHERE a.id=d.item_id AND d.language=1 AND d.type='title') as title,(SELECT e.text FROM structure_toc_texts e WHERE a.id=e.item_id AND e.language=1 AND e.type='short_description') as short_description,(SELECT f.text FROM structure_toc_texts f WHERE a.id=f.item_id AND f.language=1 AND f.type='perex') as perex FROM structure_toc a,colors z,structure_toc_names c WHERE a.id=165 AND a.id=c.item_id AND c.language=1 AND a.color=z.id: Subquery returns more than 1 row