By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,706 Members | 1,299 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,706 IT Pros & Developers. It's quick & easy.

db question

P: n/a

simple test

mysql cmd - select * from foo where dog like "%small%";

sql ="""select * from foo where dog like "%%%s%%" """
c.execute(sql, (var,))
the above doesn't work, and I can't seem to figure out how to display/print
out the sql as i't actually been excuted, so I can see where the issue is.

i've tried to "/" escape, as well as a few other things, now of which shed
any light on the issue. haven't found any information via google either.

the above works if i have something like
sql="""select * from foo where dog=%s"""

so.. any help/pointers on what i've screwed up/missed would be helpful.


Jul 21 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.