From: Hank Date: May 11 2011 7:03pm Subject: Using @ variables with LIKE,CONCAT List-Archive: http://lists.mysql.com/mysql/224982 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e659f204cc3d1304a304baf9 --0016e659f204cc3d1304a304baf9 Content-Type: text/plain; charset=ISO-8859-1 This used to work fine in Mysql 4.3, but no longer works in 5.5.8: set @txt='needle'; select * from table where field like CONCAT('%',@txt,'%'); --returns the null set. If I substitute like this: select * from table where field like '%needle%'; it works perfectly (and as it did in 4.x). How can I get this to work in 5.5.x? Thanks, -Hank --0016e659f204cc3d1304a304baf9--