MySQL Forums
Forum List  »  Connector/Python

Re: Using Python variables in MySQL INSERT statement SOLVED
Posted by: Huu Da Tran
Date: June 06, 2008 03:46PM

Better let the module work for you to avoid sql injection...
cur.execute(u'''insert into `data` values (%s, %s, %s)''',
        currtime, currtemp, currsat)

Options: ReplyQuote


Subject
Written By
Posted
Re: Using Python variables in MySQL INSERT statement SOLVED
June 06, 2008 03:46PM


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.