List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:July 20 2009 7:17pm
Subject:Re: Escape %
View as plain text  
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.
Thread
Escape %Steven Davis20 Jul
  • Re: Escape %Jay Rajput20 Jul
  • Re: Escape %Warren Young20 Jul