error SQL Query-->SELECT * FROM daigaku_master_tbl WHERE country_sid = 5 AND student_dormitory = cast(%27%20+%20entry.link%20+%20%27 as text) AND open_setting = 1 ORDER BY daigaku_code LIMIT 20 OFFSET 0

error Messaeg--> SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "%" LINE 1: ...HERE country_sid = 5 AND student_dormitory = cast(%27%20+%20... ^