SQL Error: at /home/shef/fnisc.ru/html/dreamedit/includes/class.Ilines.php line 2024
Array
(
    [code] => 0
    [message] => 
    [query] =>  SELECT z.*,z.ddd AS date2 FROM ( SELECT ie.el_id AS ARRAY_KEY, ie.itype_id AS itype,ie.*, IFNULL(d2.icont_text,'') AS ddd  FROM adm_ilines_content AS ic, adm_ilines_element AS ie  INNER JOIN adm_ilines_content AS innerTable0 ON ie.el_id = innerTable0.el_id AND innerTable0.icont_var= 'DATE'  INNER JOIN adm_ilines_content AS d2 ON d2.el_id=ie.el_id AND (d2.icont_var='date2' OR d2.icont_var='dates')  INNER JOIN adm_ilines_content AS d ON d.el_id=ie.el_id AND d.icont_var='date'  LEFT OUTER JOIN adm_ilines_content AS m ON m.el_id=ie.el_id AND m.icont_var='main'   LEFT OUTER JOIN adm_ilines_content AS ss ON ss.el_id=ie.el_id AND ss.icont_var='status2'  WHERE (ie.itype_id = 2 OR ((ie.itype_id=3 OR ie.itype_id=8 OR ie.itype_id=56 ) AND IFNULL(d2.icont_text,'')<>'' AND IFNULL(m.icont_text,0)=1))AND ie.el_id = ic.el_id  AND d2.icont_text NOT LIKE '2021.09.17%' AND  ic.icont_var  = 'status' AND ic.icont_text <> '' AND ic.icont_text IS NOT NULL  AND ((ie.itype_id=8 AND m.icont_text=1) OR ie.itype_id<>8)  AND (ie.itype_id <> 3 OR m.icont_text=1) AND IFNULL(ss.icont_text,1)<>0  AND (ie.itype_id<>8 OR (ie.itype_id=8 AND (REPLACE(SUBSTRING(d2.icont_text,1,10),'.','')<=20211002 OR REPLACE(SUBSTRING(d.icont_text,1,10),'.','')=20210917))) GROUP BY ie.el_id   ORDER BY  innerTable0.icont_text DESC ) AS z  ORDER BY  IF (REPLACE(SUBSTRING(z.ddd,1,10),'.','')>20210917 AND z.itype=8,0,1) ASC, z.ddd DESC  LIMIT -1 
    [context] => /home/shef/fnisc.ru/html/dreamedit/includes/class.Ilines.php line 2024
)