DB Error: syntax error
db_error Object
(
    [error_message_prefix] => 
    [mode] => 1
    [level] => 1024
    [code] => -2
    [message] => DB Error: syntax error
    [userinfo] => SELECT DISTINCT object.id AS object_id,
					object.additional_info_2 AS additional_info,
					object.brief_description_2 AS brief_description,
					object.view_2 AS view,
					object.price_is_from, 
					object.post_date ,
					object.size,
					object.yard,
					object.ref_no, 
					(SELECT rea_object_pics.pic_file from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic,
					(SELECT rea_object_pics.pic_link from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic_link,
					object.price_eur, 
					object.price_usd, 
					object.price_gbr, 
					object.price_bgn,
					object.offer_type, 
					object.is_new, 
					object.is_top,
					city.name_2 as city_name,city.id as ct_id,
					object.metric_yard,object.metric_size,
					object.new_offer_postdate
			FROM rea_object AS object, 
				  (
				  	SELECT  *
		        	FROM
		        		rea_city AS c
		        	WHERE
		        		c.id in  )  AND c.edate = 0
		        	) AS city 
			WHERE  
				city.id = object.city_id AND object.edate = 0 AND object.is_active = 0 
			ORDER BY object.id DESC
			LIMIT 0, 10
			 [nativecode=1064 ** 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 ')  AND c.edate = 0
		        	) AS city 
			WHERE  
				city.]
    [backtrace] => Array
        (
            [0] => Array
                (
                    [file] => /www/bulgarianestates.org.uk/root.new1.bulgarianestates.org.uk/pear/DB.php
                    [line] => 739
                    [function] => pear_error
                    [class] => db_error
                    [type] => ->
                    [args] => Array
                        (
                            [0] => DB Error: syntax error
                            [1] => -2
                            [2] => 1
                            [3] => 1024
                            [4] => SELECT DISTINCT object.id AS object_id,
					object.additional_info_2 AS additional_info,
					object.brief_description_2 AS brief_description,
					object.view_2 AS view,
					object.price_is_from, 
					object.post_date ,
					object.size,
					object.yard,
					object.ref_no, 
					(SELECT rea_object_pics.pic_file from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic,
					(SELECT rea_object_pics.pic_link from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic_link,
					object.price_eur, 
					object.price_usd, 
					object.price_gbr, 
					object.price_bgn,
					object.offer_type, 
					object.is_new, 
					object.is_top,
					city.name_2 as city_name,city.id as ct_id,
					object.metric_yard,object.metric_size,
					object.new_offer_postdate
			FROM rea_object AS object, 
				  (
				  	SELECT  *
		        	FROM
		        		rea_city AS c
		        	WHERE
		        		c.id in  )  AND c.edate = 0
		        	) AS city 
			WHERE  
				city.id = object.city_id AND object.edate = 0 AND object.is_active = 0 
			ORDER BY object.id DESC
			LIMIT 0, 10
			 [nativecode=1064 ** 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 ')  AND c.edate = 0
		        	) AS city 
			WHERE  
				city.]
                        )

                )

            [1] => Array
                (
                    [file] => /www/bulgarianestates.org.uk/root.new1.bulgarianestates.org.uk/pear/PEAR.php
                    [line] => 523
                    [function] => db_error
                    [class] => db_error
                    [type] => ->
                    [args] => Array
                        (
                            [0] => -2
                            [1] => 1
                            [2] => 1024
                            [3] => SELECT DISTINCT object.id AS object_id,
					object.additional_info_2 AS additional_info,
					object.brief_description_2 AS brief_description,
					object.view_2 AS view,
					object.price_is_from, 
					object.post_date ,
					object.size,
					object.yard,
					object.ref_no, 
					(SELECT rea_object_pics.pic_file from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic,
					(SELECT rea_object_pics.pic_link from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic_link,
					object.price_eur, 
					object.price_usd, 
					object.price_gbr, 
					object.price_bgn,
					object.offer_type, 
					object.is_new, 
					object.is_top,
					city.name_2 as city_name,city.id as ct_id,
					object.metric_yard,object.metric_size,
					object.new_offer_postdate
			FROM rea_object AS object, 
				  (
				  	SELECT  *
		        	FROM
		        		rea_city AS c
		        	WHERE
		        		c.id in  )  AND c.edate = 0
		        	) AS city 
			WHERE  
				city.id = object.city_id AND object.edate = 0 AND object.is_active = 0 
			ORDER BY object.id DESC
			LIMIT 0, 10
			 [nativecode=1064 ** 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 ')  AND c.edate = 0
		        	) AS city 
			WHERE  
				city.]
                        )

                )

            [2] => Array
                (
                    [file] => /www/bulgarianestates.org.uk/root.new1.bulgarianestates.org.uk/pear/DB/common.php
                    [line] => 500
                    [function] => raiseerror
                    [class] => pear
                    [type] => ::
                    [args] => Array
                        (
                            [0] => 
                            [1] => -2
                            [2] => 
                            [3] => 
                            [4] => SELECT DISTINCT object.id AS object_id,
					object.additional_info_2 AS additional_info,
					object.brief_description_2 AS brief_description,
					object.view_2 AS view,
					object.price_is_from, 
					object.post_date ,
					object.size,
					object.yard,
					object.ref_no, 
					(SELECT rea_object_pics.pic_file from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic,
					(SELECT rea_object_pics.pic_link from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic_link,
					object.price_eur, 
					object.price_usd, 
					object.price_gbr, 
					object.price_bgn,
					object.offer_type, 
					object.is_new, 
					object.is_top,
					city.name_2 as city_name,city.id as ct_id,
					object.metric_yard,object.metric_size,
					object.new_offer_postdate
			FROM rea_object AS object, 
				  (
				  	SELECT  *
		        	FROM
		        		rea_city AS c
		        	WHERE
		        		c.id in  )  AND c.edate = 0
		        	) AS city 
			WHERE  
				city.id = object.city_id AND object.edate = 0 AND object.is_active = 0 
			ORDER BY object.id DESC
			LIMIT 0, 10
			 [nativecode=1064 ** 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 ')  AND c.edate = 0
		        	) AS city 
			WHERE  
				city.]
                            [5] => DB_Error
                            [6] => 1
                        )

                )

            [3] => Array
                (
                    [file] => /www/bulgarianestates.org.uk/root.new1.bulgarianestates.org.uk/pear/DB/mysql.php
                    [line] => 776
                    [function] => raiseerror
                    [class] => db_mysql
                    [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 MySQL server version for the right syntax to use near ')  AND c.edate = 0
		        	) AS city 
			WHERE  
				city.
                        )

                )

            [4] => Array
                (
                    [file] => /www/bulgarianestates.org.uk/root.new1.bulgarianestates.org.uk/pear/DB/mysql.php
                    [line] => 228
                    [function] => mysqlraiseerror
                    [class] => db_mysql
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [5] => Array
                (
                    [file] => /www/bulgarianestates.org.uk/root.new1.bulgarianestates.org.uk/pear/DB/common.php
                    [line] => 1146
                    [function] => simplequery
                    [class] => db_mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => SELECT DISTINCT object.id AS object_id,
					object.additional_info_2 AS additional_info,
					object.brief_description_2 AS brief_description,
					object.view_2 AS view,
					object.price_is_from, 
					object.post_date ,
					object.size,
					object.yard,
					object.ref_no, 
					(SELECT rea_object_pics.pic_file from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic,
					(SELECT rea_object_pics.pic_link from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic_link,
					object.price_eur, 
					object.price_usd, 
					object.price_gbr, 
					object.price_bgn,
					object.offer_type, 
					object.is_new, 
					object.is_top,
					city.name_2 as city_name,city.id as ct_id,
					object.metric_yard,object.metric_size,
					object.new_offer_postdate
			FROM rea_object AS object, 
				  (
				  	SELECT  *
		        	FROM
		        		rea_city AS c
		        	WHERE
		        		c.id in  )  AND c.edate = 0
		        	) AS city 
			WHERE  
				city.id = object.city_id AND object.edate = 0 AND object.is_active = 0 
			ORDER BY object.id DESC
			LIMIT 0, 10
			
                        )

                )

            [6] => Array
                (
                    [file] => /www/bulgarianestates.org.uk/root.new1.bulgarianestates.org.uk/pear/DB/common.php
                    [line] => 1596
                    [function] => query
                    [class] => db_mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => SELECT DISTINCT object.id AS object_id,
					object.additional_info_2 AS additional_info,
					object.brief_description_2 AS brief_description,
					object.view_2 AS view,
					object.price_is_from, 
					object.post_date ,
					object.size,
					object.yard,
					object.ref_no, 
					(SELECT rea_object_pics.pic_file from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic,
					(SELECT rea_object_pics.pic_link from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic_link,
					object.price_eur, 
					object.price_usd, 
					object.price_gbr, 
					object.price_bgn,
					object.offer_type, 
					object.is_new, 
					object.is_top,
					city.name_2 as city_name,city.id as ct_id,
					object.metric_yard,object.metric_size,
					object.new_offer_postdate
			FROM rea_object AS object, 
				  (
				  	SELECT  *
		        	FROM
		        		rea_city AS c
		        	WHERE
		        		c.id in  )  AND c.edate = 0
		        	) AS city 
			WHERE  
				city.id = object.city_id AND object.edate = 0 AND object.is_active = 0 
			ORDER BY object.id DESC
			LIMIT 0, 10
			
                        )

                )

            [7] => Array
                (
                    [file] => /www/bulgarianestates.org.uk/root.new1.bulgarianestates.org.uk/offers.php
                    [line] => 658
                    [function] => getall
                    [class] => db_mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => SELECT DISTINCT object.id AS object_id,
					object.additional_info_2 AS additional_info,
					object.brief_description_2 AS brief_description,
					object.view_2 AS view,
					object.price_is_from, 
					object.post_date ,
					object.size,
					object.yard,
					object.ref_no, 
					(SELECT rea_object_pics.pic_file from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic,
					(SELECT rea_object_pics.pic_link from rea_object_pics WHERE pos_id=0 and rea_object_pics.obj_id = object.id LIMIT 1) as pic_link,
					object.price_eur, 
					object.price_usd, 
					object.price_gbr, 
					object.price_bgn,
					object.offer_type, 
					object.is_new, 
					object.is_top,
					city.name_2 as city_name,city.id as ct_id,
					object.metric_yard,object.metric_size,
					object.new_offer_postdate
			FROM rea_object AS object, 
				  (
				  	SELECT  *
		        	FROM
		        		rea_city AS c
		        	WHERE
		        		c.id in  )  AND c.edate = 0
		        	) AS city 
			WHERE  
				city.id = object.city_id AND object.edate = 0 AND object.is_active = 0 
			ORDER BY object.id DESC
			LIMIT 0, 10
			
                        )

                )

        )

    [callback] => 
)