Re: Custom SQL mayhem...

2006-10-09 Thread Malcolm Tredinnick
On Mon, 2006-10-09 at 19:03 +0100, Tom Smith wrote: > In trying to do some custom SQLto search for words (so "Three" but > not "Threesome") > > ... but because the call adds quotes.. I have had to do this... > > for word in words: > sql = """select count(*) from

Custom SQL mayhem...

2006-10-09 Thread Tom Smith
In trying to do some custom SQLto search for words (so "Three" but not "Threesome") ... but because the call adds quotes.. I have had to do this... for word in words: sql = """select count(*) from myapp_product WHERE title LIKE (%s) AND title RLIKE %s """