MySQL Forums
Forum List  »  Connector/Python

Re: arabic text insertion problem
Posted by: hatem shaheen
Date: February 24, 2010 04:22AM

i found it the example you gave is static text I need it to be from variable
this line
s = "INSERT INTO animal (name, category) VALUES ('a', '\xd8\xb6')"

must be like so to take value from a form into variable and pass the variable value on the fly

s = u"""INSERT INTO animal (name, category) VALUES ('%s', '%s')""" % (name, unicode(category,"latin-1"))

Options: ReplyQuote


Subject
Written By
Posted
February 21, 2010 03:28AM
Re: arabic text insertion problem
February 24, 2010 04:22AM


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.