MySQLdb LIKE '%%%s%%' problem

2009-01-14 Thread gumbah
I have this really strange problem. I hope someone can help: I am trying to update a database like so: UPDATE `tablename` set fieldx='test' WHERE flfieldx = null and fieldy like '%certainvalue%' My Python code looks like this: fillsql = "UPDATE `tablename` set fieldx='test' WHERE flfieldx = nul

Re: MySQLdb LIKE '%%%s%%' problem

2009-01-14 Thread gumbah
but I am pretty lost here... Googling this it seems as if no one is using "LIKE '%value%'" type queries with Python & mySQL... Anyone any other thoughts? regards, Joost On 14 jan, 10:14, John Machin wrote: > On Jan 14, 7:31 pm, gumbah wrote: > > > I have this

Re: MySQLdb LIKE '%%%s%%' problem

2009-01-14 Thread gumbah
Yep, also tried that. Weird thing is that I get no errors, it's just silently not updating... On 14 jan, 11:06, Peter Otten <__pete...@web.de> wrote: > gumbah wrote: > > I tried all of your suggestions but none of them work... I have a clue > > on why it is failing:

Re: MySQLdb LIKE '%%%s%%' problem

2009-01-14 Thread gumbah
Aahh the conn.commit() DID the trick!! I tried that before, but then it failed at another point. I got it working now! Thanks a lot Peter and John!! cheers! On 14 jan, 11:14, gumbah wrote: > Yep, also tried that. Weird thing is that I get no errors, it's just > silently not updatin