select a.name, a.search, (select count(id) from tbl_kup b where b.title like a.search%) as kup from tbl_arm a Ругается на знак %