From: Ian B. <ia...@co...> - 2004-11-05 21:41:07
|
Oleg Broytmann wrote: > On Fri, Nov 05, 2004 at 03:06:18PM -0600, Ian Bicking wrote: > >>> Quoting? >> >>If you want to search for all fields that contain the text "100%" >>(literally, not treating % as a wildcard) you would search for > > > That's exactly what I want... > > >>field LIKE "%100%%%" > > > ...but as I have said in the first message, both Postgres and MySQL > use different quoting style. They use backslash to quote % and _: > > LIKE "%100\%%" > > I have consulted documentation for Postgres 7.3 and MySQL 4.0 before > asking about double percent. Oh, I missed that part. I just committed a change to sqlbuilder.py that quotes in different ways depending on the database. Then it really needs a unit test, and I'm not sure what the quoting rules are for all databases. -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |