select *,(select count(*) from medical_like_t where mdt_idx = a1.idx) as lk from medical_t a1 where idx =
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 1