SELECT * FROM `inko_car_data_sample` WHERE `cd_state` = 1 AND cd_model!='100426' and cd_model!='100418' and cd_brand!='10135' and cd_brand!='10061' and cd_brand!='10060'AND (`cd_gubun` = 1 or `cd_gubun` = 2) and mb_id in (21, 25, 22) AND cd_gugun in('광명','김포','부천','수원','시흥','안산','안양','용인','강남구','강서구','서초구','성동구','양천구','영등포','남동구','동구','미추홀구','부평구','서구') and mb_rank=2ORDER BY cd_mileage asc LIMIT 0, 20
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 'BY cd_mileage asc LIMIT 0, 20' at line 1