MySQL Forums
Forum List  »  Connector/Python

Re: MySQLdb issue
Posted by: German Perugorria
Date: June 21, 2008 06:01AM

Its a old message. but the problems can be resolved using "literal" instead "escape"

stringel = "Somebody's string"
stringel = self.db.literal(stringel)
print stringel
#got 'Somebody\'s string'

stringel = 123456
stringel = self.db.literal(stringel)
print stringel
#got 123456

:3

Options: ReplyQuote


Subject
Written By
Posted
May 30, 2006 01:35AM
Re: MySQLdb issue
June 21, 2008 06:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.