select max(idx) as idx from tb_forsale as t left join tb_area_code as s1 on (t.sido=s1.code) left join tb_area_code as s2 on (t.gugun=s2.code) left join tb_area_code as s3 on (t.mundong=s3.code) left join tb_forsale_category as c on (t.category=c.code) where idx is not null and idx<
SQLSTATE[42000]: Syntax error or access violation: 1064 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 '' at line 4
select min(idx) as idx from tb_forsale as t left join tb_area_code as s1 on (t.sido=s1.code) left join tb_area_code as s2 on (t.gugun=s2.code) left join tb_area_code as s3 on (t.mundong=s3.code) left join tb_forsale_category as c on (t.category=c.code) where idx is not null and idx>
SQLSTATE[42000]: Syntax error or access violation: 1064 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 '' at line 4