- くだすれPython(超初心者用) その22
903 :デフォルトの名無しさん[sage]:2014/05/12(月) 12:14:49.80 ID:9VQLdq3v - Connector/Pythonを使っている人がいたら訊きたいのですが
ここに載っているような http://dev.mysql.com/doc/connector-python/en/connector-python-example-cursor-transaction.html add_employee = ("INSERT INTO employees " "(first_name, last_name, hire_date, gender, birth_date) " "VALUES (%s, %s, %s, %s, %s)") data_employee = ('Geert', 'Vanderkelen', tomorrow, 'M', date(1977, 6, 14)) cursor.execute(add_employee, data_employee) この各columnのvalueとして与える値を第二引数にあてるやり方は モジュールのほうで勝手に値をエスケープ処理してくれるんでしょうか
|
|