select bu_id, bu_rid, bu_disp, bu_rank, bu_data_type, bu_type1, bu_type2, bu_regunit, bu_pref, bu_address1, bu_address2, bu_address3, bu_build_name, bu_on_floor, bu_line1, bu_station1, bu_walk1, bu_bus1, bu_price, bu_build_ym, bu_layout_type, bu_rooms, bu_land_area, bu_build_area, bu_monopoly_area, bu_balcony_area, bu_capacity, bu_coverage, bu_from, bu_category,bu_detail,bu_trade_type, bu_outward, bu_outward_comment,bu_madori, bu_madori_comment, bu_regdate, bu_upddate, bu_sysdate, bu_catch_copy,bu_tanto,bu_lat,bu_lng,bu_condition, bu_comment, bu_movie, bu_movie_flag from bukken_sub where (1) and ( (1) and ((bu_type1 = '2' and bu_type2 = '1') or (bu_type1 = '2' and bu_type2 = '2') or (bu_type1 = '1' and bu_type2 = '1') or (bu_type1 = '3' and bu_type2 = '2') or (bu_type1 = '2') or (bu_type2 = '2')) and (bu_disp <> 2) and (bu_regunit = 5) and ( ( (1) and (bu_type1 = '2' and bu_type2 = '1') ) or ( (1) and (bu_type1 = '2' and bu_type2 = '2') ) or ( (1) and (bu_type1 = '1' and bu_type2 = '1') ) or ( (1) and (bu_type1 = '3' and bu_type2 = '2') ) or ( (1) and (bu_type1 = '2') ) or ( (1) and (bu_type2 = '2') ) ) ) order by bu_upddate desc limit -30, 30You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-30, 30' at line 32