SQL Error: Server shutdown in progress at /home/shef/fnisc.ru/html/dreamedit/includes/class.Events.php line 330
Array ( [code] => 1053 [message] => Server shutdown in progress [query] => SELECT DISTINCT * FROM (SELECT DISTINCT 'a' as REC,'1' AS type, ie.el_id AS elid, ie.el_id AS el_id,ie.itype_id,date('20241123'), IF((ie.itype_id=3)AND id2.icont_text>id.icont_text,id2.icont_text,id.icont_text) AS date, IFNULL(id2.icont_text,0) AS date2,'' AS name FROM adm_ilines_element AS ie, adm_ilines_content AS ic INNER JOIN adm_ilines_content AS id ON id.el_id=ic.el_id AND (id.icont_var='date2' ) AND REPLACE(SUBSTRING(id.icont_text,1,10),'.','') >= 20241123 AND REPLACE(SUBSTRING(id.icont_text,1,10),'.','') <= 20241123 LEFT OUTER JOIN adm_ilines_content AS id2 ON id2.el_id=ic.el_id AND (id2.icont_var='date2' OR id2.icont_var='date3')INNER JOIN adm_ilines_content AS ss ON ss.el_id=ic.el_id AND ss.icont_var='status' AND ss.icont_text=1 LEFT OUTER JOIN adm_ilines_content AS s2 ON s2.el_id=ic.el_id AND s2.icont_var='status2' INNER JOIN adm_ilines_element AS e ON e.el_id=ic.el_id WHERE (ie.itype_id=3 OR ie.itype_id=1) AND ie.el_id = ic.el_id AND (ic.icont_var='date2') AND ic.icont_text <> '' AND ic.icont_text IS NOT NULL AND (ie.itype_id<> 15 OR s2.icont_text=1) AND ie.itype_id<>14 AND ie.itype_id<>49 GROUP BY ie.el_id UNION ALL SELECT 'b' AS rec,IF(IFNULL(id2.icont_text,'')<>'' AND DATE(id2.icont_text)<=DATE(20241123) AND DATE(id2.icont_text)>=DATE(20241123),2,3) AS type,ie.el_id AS elid, ie.el_id AS el_id, ie.itype_id,date('20241123'), IF(IFNULL(id2.icont_text,'')<>'' AND REPLACE(SUBSTRING(id2.icont_text,1,10),'.','')<=20241123 AND REPLACE(SUBSTRING(id2.icont_text,1,10),'.','')>=20241123,id2.icont_text,id3.icont_text) AS date, IF(IFNULL(id2.icont_text,'')<>'',id2.icont_text,id3.icont_text) AS date2,'' AS name FROM isras2015.adm_ilines_element AS ie INNER JOIN isras2015.adm_ilines_content AS id ON id.el_id=ie.el_id AND id.icont_var='date' LEFT OUTER JOIN isras2015.adm_ilines_content AS id2 ON id2.el_id=ie.el_id AND id2.icont_var='date2' INNER JOIN isras2015.adm_ilines_content AS id3 ON id3.el_id=ie.el_id AND id3.icont_var='date3' INNER JOIN isras2015.adm_ilines_content AS ss ON ss.el_id=ie.el_id AND ss.icont_var='status' AND ss.icont_text=1 WHERE ie.itype_id=14 AND 20241123<>20210317 AND ie.el_id<>10439 AND ((REPLACE(SUBSTRING(IFNULL(id2.icont_text,0),1,10),'.','')<=20241123 AND REPLACE(SUBSTRING(id2.icont_text,1,10),'.','')>= 20241123) OR (REPLACE(SUBSTRING(id3.icont_text,1,10),'.','')<=20241123 AND REPLACE(SUBSTRING(id3.icont_text,1,10),'.','')>= 20241123)) GROUP BY ie.el_id UNION ALL SELECT 'c' as REC,'1' AS type, ie.el_id AS elid, ie.el_id AS el_id,ie.itype_id,date('20241123'), IF((ie.itype_id=2) AND id2.icont_text>id.icont_text,id2.icont_text,id.icont_text) AS date, IFNULL(id2.icont_text,0) AS date2,'' AS name FROM isras2015.adm_ilines_element AS ie, isras2015.adm_ilines_content AS ic INNER JOIN isras2015.adm_ilines_content AS id ON id.el_id=ic.el_id AND (id.icont_var='date2' ) AND REPLACE(SUBSTRING(id.icont_text,1,10),'.','') >= 20241123 AND REPLACE(SUBSTRING(id.icont_text,1,10),'.','') <= 20241123 LEFT OUTER JOIN isras2015.adm_ilines_content AS id2 ON id2.el_id=ic.el_id AND (id2.icont_var='date2' OR id2.icont_var='date3')INNER JOIN isras2015.adm_ilines_content AS ss ON ss.el_id=ic.el_id AND ss.icont_var='status' AND ss.icont_text=1 LEFT OUTER JOIN isras2015.adm_ilines_content AS ir ON ir.el_id=ic.el_id AND ir.icont_var='rubric' AND (ir.icont_text='journal' OR ir.icont_text='publ') LEFT OUTER JOIN isras2015.adm_ilines_content AS ifn ON ifn.el_id=ic.el_id AND ifn.icont_var='fnisc' AND (ifn.icont_text='1') LEFT OUTER JOIN isras2015.adm_ilines_content AS ifn2 ON ifn2.el_id=ic.el_id AND ifn2.icont_var='fnisc' LEFT OUTER JOIN isras2015.adm_ilines_content AS s2 ON s2.el_id=ic.el_id AND s2.icont_var='status2' INNER JOIN isras2015.adm_ilines_element AS e ON e.el_id=ic.el_id WHERE (((ie.itype_id=2 ) AND (IFNULL(ifn.icont_text,0) <>0 OR IFNULL(ir.icont_text,0)<>0 OR ir.icont_text='journal' OR ir.icont_text='publ') ) OR (ie.itype_id=8 AND ifn2.icont_text=1)) AND ie.el_id = ic.el_id AND (ic.icont_var = 'date' OR ic.icont_var='date2') AND ic.icont_text <> '' AND ic.icont_text IS NOT NULL AND (ie.itype_id<> 15 OR s2.icont_text=1) AND ie.itype_id<>14 AND ie.itype_id<>49 GROUP BY ie.el_id ) AS t ORDER BY IF(date2>'2024.11.23',date,99999999) ASC, IF(date2<='2024.11.23',date,'0') DESC LIMIT 0, 10 [context] => /home/shef/fnisc.ru/html/dreamedit/includes/class.Events.php line 330 )