Некорректный запрос к БД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 (gys_katalog_category.price >= 0 AND gys_katalog_category.price <= 100000000' at line 1 SELECT gys_katalog_category.*, gys_location.location as loctitle, gys_location.locrajon as locrajon, gys_location.type as loctype, gys_rajon.rajon as rajontitle, gys_direction.direction as directiontitle FROM gys_katalog_category LEFT JOIN gys_location ON gys_katalog_category.location = gys_location.id LEFT JOIN gys_rajon ON gys_katalog_category.rajon = gys_rajon.id LEFT JOIN gys_direction ON gys_katalog_category.direction = gys_direction.id WHERE gys_katalog_category.deal = AND (gys_katalog_category.price >= 0 AND gys_katalog_category.price <= 1000000000000) AND ((gys_katalog_category.square_dom >= 0 AND gys_katalog_category.square_dom <= 10000000000000) OR (gys_katalog_category.square_all >= 0 AND gys_katalog_category.square_all <= 10000000000000) OR (gys_katalog_category.square_uch >= 0 AND gys_katalog_category.square_uch <= 10000000000000)) AND gys_katalog_category.location = 2 ORDER BY gys_katalog_category.date DESC