SQL Error: 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 ')) and ( (dt_from='0000-00-00 00:00:00' AND dt_to='0000-00-00 ...' at line 3 at /var/www/okeanium/data/www/okeanium.ru/adm/lib/php/cms_sql/class_abon2.php line 71
Array
(
    [code] => 1064
    [message] => 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 '))
					and (					
					(dt_from='0000-00-00 00:00:00' AND dt_to='0000-00-00 ...' at line 3
    [query] => SELECT count(*)
					FROM cms_abon2 a				
					WHERE TRUE AND (a.id IN (SELECT abon2_id from cms_abon2_pid WHERE tree_id=))
					and (					
					(dt_from='0000-00-00 00:00:00' AND dt_to='0000-00-00 00:00:00') 					
					OR (dt_from<=now() and dt_to>=now())
					OR (dt_from='0000-00-00 00:00:00' AND dt_to>=now()) 					
					OR (dt_from<=now() AND dt_to='0000-00-00 00:00:00') 					
					)
					
    [context] => /var/www/okeanium/data/www/okeanium.ru/adm/lib/php/cms_sql/class_abon2.php line 71
)