MySQL Error!
------------------------

The Error returned was:
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 gr.type = "object" AND gr.geo_id = city.geo_id AND objects.type=objects' at line 36

Error Number:
1064
				SELECT
					objects.name, 
					objects.alt_name_objects, 
					objects.period, 
					objects.type, 
					objects.ocenka,
					objects.uslugi,
					objects.spolist, 
					objects.id_tour,
					city.namecity, 
					city.designation, 
					objects_type.id_typeobject, 
					objects_type.nametype, 
					objects_ocenka.*, 
					objects_rating.id as rating_id,
					objects_rating.title as rating_title,
					objects.arch,
					objects.znachek, 
					objects.id_objects, 
					objects.star, 
					objects.qvotas
				FROM
					objects,
					city, 
					objects_type, 
					objects_ocenka,
					objects_rating,
                                        geo_reference as gr
				WHERE 
					objects.vieweobj regexp "[[:<:]](2)[[:>:]]"
				--	AND objects.city =  
			--		AND city.id_city = objects.city 
                       
AND objects.id_objects = gr.id
AND gr.geo_id = 
AND gr.type = "object"
AND gr.geo_id = city.geo_id
					AND objects.type=objects_type.id_typeobject 
					AND objects_ocenka.id_ocen = objects.ocenka
					AND objects_rating.id = objects.rating
					AND objects.arch=0
				ORDER BY `objects`.`name` ASC