From: Warren Young Date: July 20 2009 7:17pm Subject: Re: Escape % List-Archive: http://lists.mysql.com/plusplus/8676 Message-Id: <4A64C2C6.5060809@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Steven Davis wrote: > I have a query string with the " WHERE phone_1 LIKE '%" + phone + "%'"; I > want to say that it is treating it like a %1 variable and wondering if there > was a way to escape it so it won't. I can seem to find it in the user manual > on how to do this but I could be over looking it. Thanks. The only reason it should do that is if you are using template queries, and that's just an unavoidable collision. Short of redesigning template queries, there's no way it can know which % signs should be escaped and which shouldn't. You could change your code to use one of the other query-building mechanisms instead. Personally, I prefer SSQLS and Query's ostream interface to tqueries.