Zend_Db_Statement_Mysqli_Exception Object
(
    [_previous:Zend_Exception:private] => 
    [message:protected] => Mysqli prepare 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 'ORDER BY t1.name' at line 21
    [string:Exception:private] => 
    [code:protected] => 1064
    [file:protected] => /var/www/gazeta-a/data/www/gazeta-a.ru/core/Zend/Db/Statement/Mysqli.php
    [line:protected] => 77
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/gazeta-a/data/www/gazeta-a.ru/core/Zend/Db/Statement.php
                    [line] => 115
                    [function] => _prepare
                    [class] => Zend_Db_Statement_Mysqli
                    [type] => ->
                    [args] => Array
                        (
                            [0] => SELECT 
			t1.id AS mid, t2.id AS moid,t3.id AS aid,t3.img,t1.code AS mark_code,t2.code AS model_code,t3.code,
			t1.name AS mark,t1.name_eng AS mark_eng, t2.name AS model , t3.name AS auto,t3.name_eng AS auto_eng,powerfull,t3.year,
			(SELECT name FROM `t_trtype` WHERE id = t3.tr_type ) AS tr,
			(SELECT name_eng FROM `t_trtype` WHERE id = t3.tr_type ) AS tr_eng,	
			(SELECT name FROM `t_btype` WHERE id = t3.body_type ) AS body,
			(SELECT name_eng FROM `t_btype` WHERE id = t3.body_type ) AS body_eng,
				t3.work_ob,t3.power,t3.maxspeed,t3.start,t3.all_c,
			t2.is_new
			FROM `t_mark` t1, `t_model` t2, `t_avto` t3 
			WHERE t3.id <> '2675' AND t1.id=t2.parent_id AND t2.id=t3.parent_id AND t1.is_live = 1 AND t2.is_live = 1 
			AND t3.is_live = 1 AND t1.is_check=1 AND t2.is_check=1 AND t3.is_check=1  AND SUBSTR(t3.year, 1,4) >= (200 	AND t3.class_id > 0 
				AND (
					t3.power > (SELECT (`power`- 20) as `qew` FROM `t_avto` WHERE id='2675' LIMIT 1)
					AND 
					t3.power < (SELECT (`power`+ 20) as `qew` FROM `t_avto` WHERE id='2675' LIMIT 1)
				)
			   AND t3.class_id = (
				SELECT class_id FROM `t_avto` WHERE id='2675' LIMIT 1
			)
			ORDER BY t1.name
                        )

                )

            [1] => Array
                (
                    [file] => /var/www/gazeta-a/data/www/gazeta-a.ru/core/Zend/Db/Adapter/Mysqli.php
                    [line] => 382
                    [function] => __construct
                    [class] => Zend_Db_Statement
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Zend_Db_Adapter_Mysqli Object
                                (
                                    [_numericDataTypes:protected] => Array
                                        (
                                            [0] => 0
                                            [1] => 1
                                            [2] => 2
                                            [INT] => 0
                                            [INTEGER] => 0
                                            [MEDIUMINT] => 0
                                            [SMALLINT] => 0
                                            [TINYINT] => 0
                                            [BIGINT] => 1
                                            [SERIAL] => 1
                                            [DEC] => 2
                                            [DECIMAL] => 2
                                            [DOUBLE] => 2
                                            [DOUBLE PRECISION] => 2
                                            [FIXED] => 2
                                            [FLOAT] => 2
                                        )

                                    [_stmt:protected] => Zend_Db_Statement_Mysqli Object
                                        (
                                            [_keys:protected] => Array
                                                (
                                                    [0] => inetnum
                                                    [1] => start
                                                    [2] => stop
                                                    [3] => city
                                                    [4] => region
                                                    [5] => district
                                                    [6] => LAT
                                                    [7] => LNG
                                                )

                                            [_values:protected] => Array
                                                (
                                                    [0] => 
                                                    [1] => 
                                                    [2] => 
                                                    [3] => 
                                                    [4] => 
                                                    [5] => 
                                                    [6] => 
                                                    [7] => 
                                                )

                                            [_meta:protected] => mysqli_result Object
                                                (
                                                    [current_field] => 0
                                                    [field_count] => 8
                                                    [lengths] => 
                                                    [num_rows] => 0
                                                    [type] => 1
                                                )

                                            [_stmt:protected] => 
                                            [_adapter:protected] => Zend_Db_Adapter_Mysqli Object
 *RECURSION*
                                            [_fetchMode:protected] => 2
                                            [_attribute:protected] => Array
                                                (
                                                )

                                            [_bindColumn:protected] => Array
                                                (
                                                )

                                            [_bindParam:protected] => Array
                                                (
                                                )

                                            [_sqlSplit:protected] => Array
                                                (
                                                    [0] => SELECT `t_ip_block`.* FROM `t_ip_block` WHERE ( >= start) AND ( <= stop)
                                                )

                                            [_sqlParam:protected] => Array
                                                (
                                                    [0] => SELECT `t_ip_block`.* FROM `t_ip_block` WHERE ( >= start) AND ( <= stop)
                                                )

                                            [_queryId:protected] => 
                                        )

                                    [_defaultStmtClass:protected] => Zend_Db_Statement_Mysqli
                                    [_config:protected] => Array
                                        (
                                            [username] => gazeta-a
                                            [dbname] => gazeta-a
                                            [dbhost] => localhost
                                            [host] => localhost
                                            [password] => eW9eQ8cU0o
                                            [charset] => 
                                            [persistent] => 
                                            [options] => Array
                                                (
                                                    [caseFolding] => 0
                                                    [autoQuoteIdentifiers] => 1
                                                )

                                            [driver_options] => Array
                                                (
                                                )

                                        )

                                    [_fetchMode:protected] => 2
                                    [_profiler:protected] => Zend_Db_Profiler Object
                                        (
                                            [_queryProfiles:protected] => Array
                                                (
                                                )

                                            [_enabled:protected] => 
                                            [_filterElapsedSecs:protected] => 
                                            [_filterTypes:protected] => 
                                        )

                                    [_defaultProfilerClass:protected] => Zend_Db_Profiler
                                    [_connection:protected] => mysqli Object
                                        (
                                            [affected_rows] => -1
                                            [client_info] => mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
                                            [client_version] => 50012
                                            [connect_errno] => 0
                                            [connect_error] => 
                                            [errno] => 1064
                                            [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 'ORDER BY t1.name' at line 21
                                            [error_list] => Array
                                                (
                                                )

                                            [field_count] => 8
                                            [host_info] => Localhost via UNIX socket
                                            [info] => 
                                            [insert_id] => 0
                                            [server_info] => 5.5.56-MariaDB
                                            [server_version] => 50556
                                            [stat] => Uptime: 1315345  Threads: 1  Questions: 113536167  Slow queries: 2017645  Opens: 691  Flush tables: 2  Open tables: 717  Queries per second avg: 86.316
                                            [sqlstate] => 00000
                                            [protocol_version] => 10
                                            [thread_id] => 2647712
                                            [warning_count] => 0
                                        )

                                    [_caseFolding:protected] => 0
                                    [_autoQuoteIdentifiers:protected] => 1
                                    [_allowSerialization:protected] => 1
                                    [_autoReconnectOnUnserialize:protected] => 
                                )

                            [1] => SELECT 
			t1.id AS mid, t2.id AS moid,t3.id AS aid,t3.img,t1.code AS mark_code,t2.code AS model_code,t3.code,
			t1.name AS mark,t1.name_eng AS mark_eng, t2.name AS model , t3.name AS auto,t3.name_eng AS auto_eng,powerfull,t3.year,
			(SELECT name FROM `t_trtype` WHERE id = t3.tr_type ) AS tr,
			(SELECT name_eng FROM `t_trtype` WHERE id = t3.tr_type ) AS tr_eng,	
			(SELECT name FROM `t_btype` WHERE id = t3.body_type ) AS body,
			(SELECT name_eng FROM `t_btype` WHERE id = t3.body_type ) AS body_eng,
				t3.work_ob,t3.power,t3.maxspeed,t3.start,t3.all_c,
			t2.is_new
			FROM `t_mark` t1, `t_model` t2, `t_avto` t3 
			WHERE t3.id <> '2675' AND t1.id=t2.parent_id AND t2.id=t3.parent_id AND t1.is_live = 1 AND t2.is_live = 1 
			AND t3.is_live = 1 AND t1.is_check=1 AND t2.is_check=1 AND t3.is_check=1  AND SUBSTR(t3.year, 1,4) >= (200 	AND t3.class_id > 0 
				AND (
					t3.power > (SELECT (`power`- 20) as `qew` FROM `t_avto` WHERE id='2675' LIMIT 1)
					AND 
					t3.power < (SELECT (`power`+ 20) as `qew` FROM `t_avto` WHERE id='2675' LIMIT 1)
				)
			   AND t3.class_id = (
				SELECT class_id FROM `t_avto` WHERE id='2675' LIMIT 1
			)
			ORDER BY t1.name
                        )

                )

            [2] => Array
                (
                    [file] => /var/www/gazeta-a/data/www/gazeta-a.ru/core/Zend/Db/Adapter/Abstract.php
                    [line] => 467
                    [function] => prepare
                    [class] => Zend_Db_Adapter_Mysqli
                    [type] => ->
                    [args] => Array
                        (
                            [0] => SELECT 
			t1.id AS mid, t2.id AS moid,t3.id AS aid,t3.img,t1.code AS mark_code,t2.code AS model_code,t3.code,
			t1.name AS mark,t1.name_eng AS mark_eng, t2.name AS model , t3.name AS auto,t3.name_eng AS auto_eng,powerfull,t3.year,
			(SELECT name FROM `t_trtype` WHERE id = t3.tr_type ) AS tr,
			(SELECT name_eng FROM `t_trtype` WHERE id = t3.tr_type ) AS tr_eng,	
			(SELECT name FROM `t_btype` WHERE id = t3.body_type ) AS body,
			(SELECT name_eng FROM `t_btype` WHERE id = t3.body_type ) AS body_eng,
				t3.work_ob,t3.power,t3.maxspeed,t3.start,t3.all_c,
			t2.is_new
			FROM `t_mark` t1, `t_model` t2, `t_avto` t3 
			WHERE t3.id <> '2675' AND t1.id=t2.parent_id AND t2.id=t3.parent_id AND t1.is_live = 1 AND t2.is_live = 1 
			AND t3.is_live = 1 AND t1.is_check=1 AND t2.is_check=1 AND t3.is_check=1  AND SUBSTR(t3.year, 1,4) >= (200 	AND t3.class_id > 0 
				AND (
					t3.power > (SELECT (`power`- 20) as `qew` FROM `t_avto` WHERE id='2675' LIMIT 1)
					AND 
					t3.power < (SELECT (`power`+ 20) as `qew` FROM `t_avto` WHERE id='2675' LIMIT 1)
				)
			   AND t3.class_id = (
				SELECT class_id FROM `t_avto` WHERE id='2675' LIMIT 1
			)
			ORDER BY t1.name
                        )

                )

            [3] => Array
                (
                    [file] => /var/www/gazeta-a/data/www/gazeta-a.ru/core/Model/Classmate.php
                    [line] => 92
                    [function] => query
                    [class] => Zend_Db_Adapter_Abstract
                    [type] => ->
                    [args] => Array
                        (
                            [0] => SELECT 
			t1.id AS mid, t2.id AS moid,t3.id AS aid,t3.img,t1.code AS mark_code,t2.code AS model_code,t3.code,
			t1.name AS mark,t1.name_eng AS mark_eng, t2.name AS model , t3.name AS auto,t3.name_eng AS auto_eng,powerfull,t3.year,
			(SELECT name FROM `t_trtype` WHERE id = t3.tr_type ) AS tr,
			(SELECT name_eng FROM `t_trtype` WHERE id = t3.tr_type ) AS tr_eng,	
			(SELECT name FROM `t_btype` WHERE id = t3.body_type ) AS body,
			(SELECT name_eng FROM `t_btype` WHERE id = t3.body_type ) AS body_eng,
				t3.work_ob,t3.power,t3.maxspeed,t3.start,t3.all_c,
			t2.is_new
			FROM `t_mark` t1, `t_model` t2, `t_avto` t3 
			WHERE t3.id <> '2675' AND t1.id=t2.parent_id AND t2.id=t3.parent_id AND t1.is_live = 1 AND t2.is_live = 1 
			AND t3.is_live = 1 AND t1.is_check=1 AND t2.is_check=1 AND t3.is_check=1  AND SUBSTR(t3.year, 1,4) >= (200 	AND t3.class_id > 0 
				AND (
					t3.power > (SELECT (`power`- 20) as `qew` FROM `t_avto` WHERE id='2675' LIMIT 1)
					AND 
					t3.power < (SELECT (`power`+ 20) as `qew` FROM `t_avto` WHERE id='2675' LIMIT 1)
				)
			   AND t3.class_id = (
				SELECT class_id FROM `t_avto` WHERE id='2675' LIMIT 1
			)
			ORDER BY t1.name
                        )

                )

            [4] => Array
                (
                    [file] => /var/www/gazeta-a/data/www/gazeta-a.ru/core/Model/Classmate.php
                    [line] => 134
                    [function] => getClassmate
                    [class] => Model_Classmate
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 2675
                            [1] => (200
                        )

                )

            [5] => Array
                (
                    [file] => /var/www/gazeta-a/data/www/gazeta-a.ru/core/Controller/Autocatalog/Main.php
                    [line] => 633
                    [function] => getBigInformer
                    [class] => Model_Classmate
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 2675
                            [1] => Array
                                (
                                    [sys_country] => 1
                                    [sys_city] => 2
                                    [sys_city_type] => 1
                                    [sys_city_parent] => 2
                                    [sys_city_url] => msk
                                    [sys_city_name] => Москва
                                    [sys_city_name_pad] => Москве
                                    [sys_area] => 10
                                )

                            [2] => autocatalog
                            [3] => (200
                        )

                )

            [6] => Array
                (
                    [file] => /var/www/gazeta-a/data/www/gazeta-a.ru/core/Controller/Autocatalog/Main.php
                    [line] => 82
                    [function] => _getTechChar
                    [class] => Controller_Autocatalog_Main
                    [type] => ->
                    [args] => Array
                        (
                            [0] => LADA
                            [1] => Kalina
                            [2] => 
                        )

                )

            [7] => Array
                (
                    [file] => /var/www/gazeta-a/data/www/gazeta-a.ru/core/Router.php
                    [line] => 59
                    [function] => indexAction
                    [class] => Controller_Autocatalog_Main
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [8] => Array
                (
                    [file] => /var/www/gazeta-a/data/www/gazeta-a.ru/index.php
                    [line] => 23
                    [function] => delegate
                    [class] => Router
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

        )

    [previous:Exception:private] => 
)