We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
原书例子
sql = 'INSERT INTO {table}({keys}) VALUES ({values}) ON DUPLICATE KEY UPDATE'.format(table=table, keys=keys, values=values) update = ','.join(["{key} = %ss".format(key=key) for key in data])
执行无法插入报错,修改为
sql = 'INSERT INTO {table}({keys}) VALUES ({values}) ON DUPLICATE KEY UPDATE '.format(table=table, keys=keys, values=values) update = ','.join(["{key} = %s".format(key=key) for key in data])
The text was updated successfully, but these errors were encountered:
感谢反馈,的确是转义错误导致,我会尽快修正此勘误。
Sorry, something went wrong.
No branches or pull requests
原书例子
执行无法插入报错,修改为
The text was updated successfully, but these errors were encountered: