Unknown column 'r' in 'where clause'
select classid from ***_ecms_app where id = r