SQL Error: at /home/shef/test.fnisc.ru/html/dreamedit/includes/class.Magazines.php line 2607
Array
(
    [code] => 0
    [message] => 
    [query] => SELECT * FROM (
	(SELECT DISTINCT 'mag' as 'type',c.page_id,c.cv_text AS name,m.cv_text as name2,
		    	               t.cv_text AS avtor, y.cv_text AS year, '*' as visible,' ' AS full,' ' AS lang FROM isras2015.adm_pages_content AS c  INNER JOIN isras2015.adm_pages_content AS t ON t.page_id=c.page_id AND t.cv_name='title'  INNER JOIN isras2015.adm_pages_content AS y ON y.page_id=c.page_id AND y.cv_name='year' INNER JOIN isras2015.adm_pages_content AS m ON m.page_id=c.page_id AND m.cv_name='month'  INNER JOIN isras2015.adm_pages AS pp ON pp.page_id=c.page_id AND pp.page_status=1  WHERE c.cv_name='content'   AND ((pp.page_parent=596 AND y.cv_text<2014) OR (pp.page_parent=577 AND y.cv_text<2014) OR (pp.page_parent=579 AND y.cv_text<2014) OR (pp.page_parent=580 AND y.cv_text<2014) OR (pp.page_parent=581 AND y.cv_text<2014) OR (pp.page_parent=582 AND y.cv_text<2014) OR (pp.page_parent=584 AND y.cv_text<2014) OR (pp.page_parent=989 AND y.cv_text<2014) OR (pp.page_parent=1224 AND y.cv_text<2014) OR (pp.page_parent=1360 AND y.cv_text<2014) OR (pp.page_parent=1225 AND y.cv_text<2014) OR (pp.page_parent=1508 AND y.cv_text<2014) OR (pp.page_parent=1659 AND y.cv_text<2014) OR (pp.page_parent=1799 AND y.cv_text<2014) OR (pp.page_parent=2205 AND y.cv_text<2014) OR (pp.page_parent=2354 AND y.cv_text<2014) OR (pp.page_parent=887 AND y.cv_text<1990) OR (pp.page_parent=1837 AND y.cv_text<1900) OR (pp.page_parent=1698 AND y.cv_text<1900) OR (pp.page_parent=637 AND y.cv_text<2013) OR (pp.page_parent=784 AND y.cv_text<2013) OR (pp.page_parent=982 AND y.cv_text<2013) OR (pp.page_parent=1344 AND y.cv_text<2013) OR (pp.page_parent=1506 AND y.cv_text<2013) OR (pp.page_parent=1649 AND y.cv_text<2013) OR (pp.page_parent=1786 AND y.cv_text<2013) OR (pp.page_parent=2185 AND y.cv_text<2013) OR (pp.page_parent=2357 AND y.cv_text<2013) OR (pp.page_parent=826 AND y.cv_text<1900) OR (pp.page_parent=921 AND y.cv_text<1900) OR (pp.page_parent=1090 AND y.cv_text<2022) OR (pp.page_parent=247 AND y.cv_text<1900)) AND y.cv_text>1900 AND (c.cv_text like '% ..%'  OR  c.cv_text like '% . .%'  OR  c.cv_text like '% ..%'  OR c.cv_text like '%..  %'  OR c.cv_text like '%.. .%'  OR c.cv_text like '%.  %'  OR c.cv_text like '%. ,%'  OR c.cv_text like '% %'  OR c.cv_text like '%.  %'  OR c.cv_text like '%. .%'  OR c.cv_text like '%. , %'  OR c.cv_text like '%  %'  OR c.cv_text like '% , %'  OR c.cv_text like '% . .%'  OR c.cv_text like '%  .%'  OR c.cv_text like '%. .  %'  OR c.cv_text like '%. . , %'  OR c.cv_text like '%   %'  OR c.cv_text like '%.. %'  OR c.cv_text like '%  , %'   )) 
								 
								 UNION ALL 
								 (  SELECT 'publ' AS 'type',   id AS page_id,name,name2,avtor,year,`as` AS visible,link AS full,IF(substring(name,1,1)<>'',INTERVAL(191,ASCII(name)),INTERVAL(191,ASCII(substring(name,2)))) as lang FROM  isras2015.`publ` WHERE IFNULL(imp,0)<>'on' AND  (publ.status=1 OR publ.status2=1) AND  year > 1900  AND  (((avtor LIKE '2405
%' OR avtor LIKE '%
2405
%') AND (SELECT count(id) FROM isras2015.publ AS p WHERE p.parent_id=publ.id )=0 ) OR (editors like '2405
%' OR editors like'%
2405
%') ) ) UNION ALL ( SELECT 'v' AS 'type',page_id,name,CONCAT(' // ',j_name,'. ',year,'. ',number,', C. ',pages) AS name2, people AS avtor,year,'*' AS visible,'' AS full,' ' AS lang FROM vestnik.`adm_article` WHERE (people LIKE '2405
%' OR people LIKE '%
2405' OR people LIKE '%
2405
%') AND date_public <> '' AND year > 1900 ) UNION ALL ( SELECT 'socis' AS 'type',a.page_id,a.name,CONCAT(' // ',a.j_name,'. ',a.year,'. ',a.number,', C. ',a.pages) AS name2, a.people AS avtor,a.year,'*' AS visible,'' AS full,' ' AS lang FROM socis.persona INNER JOIN socis.`adm_article` AS a ON a.people LIKE CONCAT(persona.id,'
%') OR a.people LIKE CONCAT('%
',persona.id,'
%') WHERE (persona.surname='' OR persona.surname='' OR persona.surname='') AND persona.name='' AND persona.fname='' AND date_public <> '' AND year > 1900 ) ) AS z ORDER BY YEAR desc, type desc,lang, name asc [context] => /home/shef/test.fnisc.ru/html/dreamedit/includes/class.Magazines.php line 2607 )