DB Error: syntax error
DB_Error Object ( [error_message_prefix] => [mode] => 1 [level] => 1024 [code] => -2 [message] => DB Error: syntax error [userinfo] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 [nativecode=1064 ** 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 '-18,18' at line 76] [backtrace] => Array ( [0] => Array ( [file] => /home/tennisav/public_html/avenuehomes.bg/pear/DB.php [line] => 748 [function] => PEAR_Error [class] => PEAR_Error [object] => DB_Error Object *RECURSION* [type] => -> [args] => Array ( [0] => DB Error: syntax error [1] => -2 [2] => 1 [3] => 1024 [4] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 [nativecode=1064 ** 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 '-18,18' at line 76] ) ) [1] => Array ( [file] => /home/tennisav/public_html/avenuehomes.bg/pear/PEAR.php [line] => 541 [function] => DB_Error [class] => DB_Error [object] => DB_Error Object *RECURSION* [type] => -> [args] => Array ( [0] => -2 [1] => 1 [2] => 1024 [3] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 [nativecode=1064 ** 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 '-18,18' at line 76] ) ) [2] => Array ( [file] => /home/tennisav/public_html/avenuehomes.bg/pear/DB/common.php [line] => 495 [function] => raiseError [class] => PEAR [object] => DB_mysql Object ( [connection] => Resource id #14 [phptype] => mysql [dbsyntax] => mysql [prepare_tokens] => Array ( ) [prepare_types] => Array ( ) [num_rows] => Array ( [38] => 1 [39] => 14 [40] => 55 [41] => 17 [46] => 3 [55] => 3 [56] => 55 [57] => 55 [58] => 1 [60] => 3 [61] => 2 [62] => 2 [63] => 0 [65] => 7 ) [transaction_opcount] => 0 [autocommit] => 1 [fetchmode] => 2 [_db] => tennisav_estate [features] => Array ( [prepare] => [pconnect] => 1 [transactions] => 1 [limit] => alter ) [errorcode_map] => Array ( [1004] => -15 [1005] => -15 [1006] => -15 [1007] => -5 [1008] => -17 [1022] => -5 [1046] => -14 [1048] => -3 [1050] => -5 [1051] => -18 [1054] => -19 [1062] => -5 [1064] => -2 [1100] => -21 [1136] => -22 [1146] => -18 [1216] => -3 [1217] => -3 ) [prepared_queries] => [prepare_maxstmt] => 0 [last_query] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 [fetchmode_object_class] => stdClass [options] => Array ( [persistent] => [ssl] => [debug] => 0 [seqname_format] => %s_seq [autofree] => [portability] => 0 [optimize] => performance ) [dbh] => [_debug] => [_default_error_mode] => [_default_error_options] => [_default_error_handler] => [_error_class] => DB_Error [_expected_errors] => Array ( ) [dsn] => Array ( [phptype] => mysql [dbsyntax] => mysql [username] => tennisav_user [password] => t3SIddnF-UlT [protocol] => tcp [hostspec] => localhost [port] => [socket] => [database] => tennisav_estate ) ) [type] => -> [args] => Array ( [0] => [1] => -2 [2] => [3] => [4] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 [nativecode=1064 ** 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 '-18,18' at line 76] [5] => DB_Error [6] => 1 ) ) [3] => Array ( [file] => /home/tennisav/public_html/avenuehomes.bg/pear/DB/mysql.php [line] => 776 [function] => raiseError [class] => DB_common [object] => DB_mysql Object ( [connection] => Resource id #14 [phptype] => mysql [dbsyntax] => mysql [prepare_tokens] => Array ( ) [prepare_types] => Array ( ) [num_rows] => Array ( [38] => 1 [39] => 14 [40] => 55 [41] => 17 [46] => 3 [55] => 3 [56] => 55 [57] => 55 [58] => 1 [60] => 3 [61] => 2 [62] => 2 [63] => 0 [65] => 7 ) [transaction_opcount] => 0 [autocommit] => 1 [fetchmode] => 2 [_db] => tennisav_estate [features] => Array ( [prepare] => [pconnect] => 1 [transactions] => 1 [limit] => alter ) [errorcode_map] => Array ( [1004] => -15 [1005] => -15 [1006] => -15 [1007] => -5 [1008] => -17 [1022] => -5 [1046] => -14 [1048] => -3 [1050] => -5 [1051] => -18 [1054] => -19 [1062] => -5 [1064] => -2 [1100] => -21 [1136] => -22 [1146] => -18 [1216] => -3 [1217] => -3 ) [prepared_queries] => [prepare_maxstmt] => 0 [last_query] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 [fetchmode_object_class] => stdClass [options] => Array ( [persistent] => [ssl] => [debug] => 0 [seqname_format] => %s_seq [autofree] => [portability] => 0 [optimize] => performance ) [dbh] => [_debug] => [_default_error_mode] => [_default_error_options] => [_default_error_handler] => [_error_class] => DB_Error [_expected_errors] => Array ( ) [dsn] => Array ( [phptype] => mysql [dbsyntax] => mysql [username] => tennisav_user [password] => t3SIddnF-UlT [protocol] => tcp [hostspec] => localhost [port] => [socket] => [database] => tennisav_estate ) ) [type] => -> [args] => Array ( [0] => -2 [1] => [2] => [3] => [4] => 1064 ** 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 '-18,18' at line 76 ) ) [4] => Array ( [file] => /home/tennisav/public_html/avenuehomes.bg/pear/DB/mysql.php [line] => 228 [function] => mysqlRaiseError [class] => DB_mysql [object] => DB_mysql Object ( [connection] => Resource id #14 [phptype] => mysql [dbsyntax] => mysql [prepare_tokens] => Array ( ) [prepare_types] => Array ( ) [num_rows] => Array ( [38] => 1 [39] => 14 [40] => 55 [41] => 17 [46] => 3 [55] => 3 [56] => 55 [57] => 55 [58] => 1 [60] => 3 [61] => 2 [62] => 2 [63] => 0 [65] => 7 ) [transaction_opcount] => 0 [autocommit] => 1 [fetchmode] => 2 [_db] => tennisav_estate [features] => Array ( [prepare] => [pconnect] => 1 [transactions] => 1 [limit] => alter ) [errorcode_map] => Array ( [1004] => -15 [1005] => -15 [1006] => -15 [1007] => -5 [1008] => -17 [1022] => -5 [1046] => -14 [1048] => -3 [1050] => -5 [1051] => -18 [1054] => -19 [1062] => -5 [1064] => -2 [1100] => -21 [1136] => -22 [1146] => -18 [1216] => -3 [1217] => -3 ) [prepared_queries] => [prepare_maxstmt] => 0 [last_query] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 [fetchmode_object_class] => stdClass [options] => Array ( [persistent] => [ssl] => [debug] => 0 [seqname_format] => %s_seq [autofree] => [portability] => 0 [optimize] => performance ) [dbh] => [_debug] => [_default_error_mode] => [_default_error_options] => [_default_error_handler] => [_error_class] => DB_Error [_expected_errors] => Array ( ) [dsn] => Array ( [phptype] => mysql [dbsyntax] => mysql [username] => tennisav_user [password] => t3SIddnF-UlT [protocol] => tcp [hostspec] => localhost [port] => [socket] => [database] => tennisav_estate ) ) [type] => -> [args] => Array ( ) ) [5] => Array ( [file] => /home/tennisav/public_html/avenuehomes.bg/pear/DB/common.php [line] => 1135 [function] => simpleQuery [class] => DB_mysql [object] => DB_mysql Object ( [connection] => Resource id #14 [phptype] => mysql [dbsyntax] => mysql [prepare_tokens] => Array ( ) [prepare_types] => Array ( ) [num_rows] => Array ( [38] => 1 [39] => 14 [40] => 55 [41] => 17 [46] => 3 [55] => 3 [56] => 55 [57] => 55 [58] => 1 [60] => 3 [61] => 2 [62] => 2 [63] => 0 [65] => 7 ) [transaction_opcount] => 0 [autocommit] => 1 [fetchmode] => 2 [_db] => tennisav_estate [features] => Array ( [prepare] => [pconnect] => 1 [transactions] => 1 [limit] => alter ) [errorcode_map] => Array ( [1004] => -15 [1005] => -15 [1006] => -15 [1007] => -5 [1008] => -17 [1022] => -5 [1046] => -14 [1048] => -3 [1050] => -5 [1051] => -18 [1054] => -19 [1062] => -5 [1064] => -2 [1100] => -21 [1136] => -22 [1146] => -18 [1216] => -3 [1217] => -3 ) [prepared_queries] => [prepare_maxstmt] => 0 [last_query] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 [fetchmode_object_class] => stdClass [options] => Array ( [persistent] => [ssl] => [debug] => 0 [seqname_format] => %s_seq [autofree] => [portability] => 0 [optimize] => performance ) [dbh] => [_debug] => [_default_error_mode] => [_default_error_options] => [_default_error_handler] => [_error_class] => DB_Error [_expected_errors] => Array ( ) [dsn] => Array ( [phptype] => mysql [dbsyntax] => mysql [username] => tennisav_user [password] => t3SIddnF-UlT [protocol] => tcp [hostspec] => localhost [port] => [socket] => [database] => tennisav_estate ) ) [type] => -> [args] => Array ( [0] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 ) ) [6] => Array ( [file] => /home/tennisav/public_html/avenuehomes.bg/pear/DB/common.php [line] => 1572 [function] => query [class] => DB_common [object] => DB_mysql Object ( [connection] => Resource id #14 [phptype] => mysql [dbsyntax] => mysql [prepare_tokens] => Array ( ) [prepare_types] => Array ( ) [num_rows] => Array ( [38] => 1 [39] => 14 [40] => 55 [41] => 17 [46] => 3 [55] => 3 [56] => 55 [57] => 55 [58] => 1 [60] => 3 [61] => 2 [62] => 2 [63] => 0 [65] => 7 ) [transaction_opcount] => 0 [autocommit] => 1 [fetchmode] => 2 [_db] => tennisav_estate [features] => Array ( [prepare] => [pconnect] => 1 [transactions] => 1 [limit] => alter ) [errorcode_map] => Array ( [1004] => -15 [1005] => -15 [1006] => -15 [1007] => -5 [1008] => -17 [1022] => -5 [1046] => -14 [1048] => -3 [1050] => -5 [1051] => -18 [1054] => -19 [1062] => -5 [1064] => -2 [1100] => -21 [1136] => -22 [1146] => -18 [1216] => -3 [1217] => -3 ) [prepared_queries] => [prepare_maxstmt] => 0 [last_query] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 [fetchmode_object_class] => stdClass [options] => Array ( [persistent] => [ssl] => [debug] => 0 [seqname_format] => %s_seq [autofree] => [portability] => 0 [optimize] => performance ) [dbh] => [_debug] => [_default_error_mode] => [_default_error_options] => [_default_error_handler] => [_error_class] => DB_Error [_expected_errors] => Array ( ) [dsn] => Array ( [phptype] => mysql [dbsyntax] => mysql [username] => tennisav_user [password] => t3SIddnF-UlT [protocol] => tcp [hostspec] => localhost [port] => [socket] => [database] => tennisav_estate ) ) [type] => -> [args] => Array ( [0] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 ) ) [7] => Array ( [file] => /home/tennisav/public_html/avenuehomes.bg/properties.php [line] => 1079 [function] => getAll [class] => DB_common [object] => DB_mysql Object ( [connection] => Resource id #14 [phptype] => mysql [dbsyntax] => mysql [prepare_tokens] => Array ( ) [prepare_types] => Array ( ) [num_rows] => Array ( [38] => 1 [39] => 14 [40] => 55 [41] => 17 [46] => 3 [55] => 3 [56] => 55 [57] => 55 [58] => 1 [60] => 3 [61] => 2 [62] => 2 [63] => 0 [65] => 7 ) [transaction_opcount] => 0 [autocommit] => 1 [fetchmode] => 2 [_db] => tennisav_estate [features] => Array ( [prepare] => [pconnect] => 1 [transactions] => 1 [limit] => alter ) [errorcode_map] => Array ( [1004] => -15 [1005] => -15 [1006] => -15 [1007] => -5 [1008] => -17 [1022] => -5 [1046] => -14 [1048] => -3 [1050] => -5 [1051] => -18 [1054] => -19 [1062] => -5 [1064] => -2 [1100] => -21 [1136] => -22 [1146] => -18 [1216] => -3 [1217] => -3 ) [prepared_queries] => [prepare_maxstmt] => 0 [last_query] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 [fetchmode_object_class] => stdClass [options] => Array ( [persistent] => [ssl] => [debug] => 0 [seqname_format] => %s_seq [autofree] => [portability] => 0 [optimize] => performance ) [dbh] => [_debug] => [_default_error_mode] => [_default_error_options] => [_default_error_handler] => [_error_class] => DB_Error [_expected_errors] => Array ( ) [dsn] => Array ( [phptype] => mysql [dbsyntax] => mysql [username] => tennisav_user [password] => t3SIddnF-UlT [protocol] => tcp [hostspec] => localhost [port] => [socket] => [database] => tennisav_estate ) ) [type] => -> [args] => Array ( [0] => SELECT SQL_CALC_FOUND_ROWS DISTINCT properties.id, properties.bedrooms, properties.bathrooms, properties.view_bg AS view, properties.size_property, properties.size_total_floor_area, properties.price_from_flag, properties.size_from, properties.size_to, properties.name_bg AS name, properties.name_bg AS title, properties.brief_info_bg AS description, properties.price_starts_from, properties.ref_no, properties.price_total, properties.price_per_month, properties.price_per_quarter, properties.price_per_half, properties.price_per_year, properties.price_discount, properties.price_per_sqm, properties.city_id, (SELECT name_bg FROM avenue_cities AS cities WHERE city_id = cities.id LIMIT 1) AS city_name, (SELECT pic FROM avenue_properties_images WHERE property_id = properties.id ORDER BY pos LIMIT 1) AS pic, (SELECT cities.name_bg FROM avenue_cities AS cities WHERE cities.id = properties.city_id) AS city_name, (SELECT cities.name_bg FROM avenue_countries AS cities WHERE cities.id = properties.country_id) AS country_name, (SELECT municipalities.name_bg FROM avenue_municipalities AS municipalities WHERE municipalities.id = properties.municipality_id) AS municipality_name, properties.sold, properties.complete, properties.new_property, properties.complex, properties.own, properties.resales, properties.first_line, properties.exclusive, properties.leasing, properties.top_location, properties.top_offer, properties.low_prices FROM avenue_properties AS properties WHERE properties.edate = 0 AND properties.active = 1 AND properties.complex_id = 6 ORDER BY properties.complex, postdate DESC LIMIT -18,18 ) ) ) [callback] => )