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 'order by btg_code' at line 6
select *
from blog_data as blg
inner join blog_data_tags as bts on blg_key_id = bts_blg_id and bts_del_flg = 0
inner join blog_tag as btg on bts_btg_id = btg_key_id and btg_del_flg = 0
where blg_key_id =
order by btg_code