• NAPAKA - getPagesFromParent: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-4' at line 11
    SELECT  s.*  
                FROM stran s
                  LEFT JOIN pripadnost p ON (s.stranid = p.elementid)
                  LEFT JOIN podatek datum ON datum.stranid = s.stranid AND datum.atributid = 18
                WHERE deleted = 0 AND s.skrij = 0 
                      AND IF(s.timelimitfrom = 0 OR (s.timelimitfrom <> 0 AND s.timelimitfrom <= UNIX_TIMESTAMP()), 1, 0) = 1
                      AND IF(s.timelimitto = 0 OR (s.timelimitto <> 0 AND s.timelimitto >= UNIX_TIMESTAMP()), 1, 0) = 1
                 AND (s.parent = 6 OR p.stranid = 6) AND s.tipid IN (3,4,5,6,7,8)  
                GROUP BY s.stranid
                ORDER BY s.red ASC
                LIMIT -4