Oops! Query failed! Tried to execute:
SELECT COUNT(*) AS agg_result FROM texts LEFT JOIN texts_i18n
ON texts.id = texts_i18n.i18n_foreign_key
AND texts_i18n.i18n_locale = 'ru_RU' LEFT JOIN text_modules tm ON tm.id = texts.text_module_id WHERE active = 1 AND tm.parent_id =
The SQL server said: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3.
The error occurred on line 91 of /var/www/address-ru/lib/Mysql.Sql.class.php
#0 ApplicationError->report() called at [/var/www/address-ru/lib/Mysql.Sql.class.php:111] #1 Mysql->query(SELECT COUNT(*) AS agg_result FROM texts LEFT JOIN texts_i18n ON texts.id = texts_i18n.i18n_foreign_key AND texts_i18n.i18n_locale = 'ru_RU' LEFT JOIN text_modules tm ON tm.id = texts.text_module_id WHERE active = 1 AND tm.parent_id = ) called at [/var/www/address-ru/lib/ActiveRecord.class.php:1188] #2 ActiveRecord->query(SELECT COUNT(*) AS agg_result FROM texts LEFT JOIN texts_i18n ON texts.id = texts_i18n.i18n_foreign_key AND texts_i18n.i18n_locale = 'ru_RU' LEFT JOIN text_modules tm ON tm.id = texts.text_module_id WHERE active = 1 AND tm.parent_id = ) called at [/var/www/address-ru/lib/ActiveRecord.class.php:1065] #3 ActiveRecord->aggregate_all(count_all, Array ([0] => *,[1] => active = 1 AND tm.parent_id = ,[2] => LEFT JOIN text_modules tm ON tm.id = texts.text_module_id)) called at [/var/www/address-ru/lib/ActiveRecord.class.php:609] #4 ActiveRecord->__call(count_all, Array ([0] => *,[1] => active = 1 AND tm.parent_id = ,[2] => LEFT JOIN text_modules tm ON tm.id = texts.text_module_id)) #5 Text->count_all(*, active = 1 AND tm.parent_id = , LEFT JOIN text_modules tm ON tm.id = texts.text_module_id) called at [/var/www/address-ru/lib/ActiveRecord.class.php:1391] #6 ActiveRecord->find_all(active = 1 AND tm.parent_id = , date DESC, 10, LEFT JOIN text_modules tm ON tm.id = texts.text_module_id) called at [/var/www/address-ru/controllers/public_text_controller.php:76] #7 PublicTextController->index(Array ([controller] => public_text,[action] => index,[type] => services,[id] => 7)) called at [/var/www/address-ru/lib/BaseController.class.php:332] #8 BaseController->process_route() called at [/var/www/address-ru/public/dispatch.php:40]
Oops! Model Class: Text
Error Message: ActiveRecord: Could not perform aggregation.
The error occurred on line 2787 of /var/www/address-ru/lib/ActiveRecord.class.php
#0 ApplicationError->report() called at [/var/www/address-ru/public/_inc.php:121] #1 exceptionHandler(ApplicationError Object ([] => Model Class: Text
Error Message: ActiveRecord: Could not perform aggregation.,[] => ,[] => 500,[] => /var/www/address-ru/lib/ActiveRecord.class.php,[] => 2787,[] => Array ([0] => Array ([file] => /var/www/address-ru/lib/ActiveRecord.class.php,[line] => 1066,[function] => raise,[class] => ActiveRecord,[type] => ->,[args] => Array ([0] => ActiveRecord: Could not perform aggregation.)),[1] => Array ([file] => /var/www/address-ru/lib/ActiveRecord.class.php,[line] => 609,[function] => aggregate_all,[class] => ActiveRecord,[type] => ->,[args] => Array ([0] => count_all,[1] => Array ([0] => *,[1] => active = 1 AND tm.parent_id = ,[2] => LEFT JOIN text_modules tm ON tm.id = texts.text_module_id))),[2] => Array ([function] => __call,[class] => ActiveRecord,[type] => ->,[args] => Array ([0] => count_all,[1] => Array ([0] => *,[1] => active = 1 AND tm.parent_id = ,[2] => LEFT JOIN text_modules tm ON tm.id = texts.text_module_id))),[3] => Array ([file] => /var/www/address-ru/lib/ActiveRecord.class.php,[line] => 1391,[function] => count_all,[class] => Text,[type] => ->,[args] => Array ([0] => *,[1] => active = 1 AND tm.parent_id = ,[2] => LEFT JOIN text_modules tm ON tm.id = texts.text_module_id)),[4] => Array ([file] => /var/www/address-ru/controllers/public_text_controller.php,[line] => 76,[function] => find_all,[class] => ActiveRecord,[type] => ->,[args] => Array ([0] => active = 1 AND tm.parent_id = ,[1] => date DESC,[2] => 10,[3] => LEFT JOIN text_modules tm ON tm.id = texts.text_module_id)),[5] => Array ([file] => /var/www/address-ru/lib/BaseController.class.php,[line] => 332,[function] => index,[class] => PublicTextController,[type] => ->,[args] => Array ([0] => Array ([controller] => public_text,[action] => index,[type] => services,[id] => 7))),[6] => Array ([file] => /var/www/address-ru/public/dispatch.php,[line] => 40,[function] => process_route,[class] => BaseController,[type] => ->,[args] => Array ()))))