Website content quality is poor, distribution efficiency is too low how to do?Huawei engineers offer 5 unique skills>>>
sql="update tb1 set xxx=vvv where id=nnn;update tb1 set xxx=www where id=kkk;"
cursor.execute(sql)
Then it will report this error:
Commands out of sync; you can't run this command now
Solution:
replace execute with executemany and pass in the parameter array
remember that the parameter of executemany is required, but execute is not required
sql="update tb1 set xxx=vvv where id=nnn;update tb2 set xxx=www where id=kkk;"
cursor.executemany(sql,[])
Similar Posts:
- Command CompileSwift failed with a nonzero exit code when build iOS image classification
- org.xml.sax.SAXParseException: Content is not allowed in trailing section
- An association from the table content refers to an
- Could not find module “@angular-devkit/build-angular”
- Could not open input file: composer.phar
- Could not publish to the server. java.lang.NullPoi
- Node: background NPM start error: mongooseserverselection error: connect econnrefused 127.0.0.1:27017
- [Solved] Java Call Error: java.lang.IllegalArgumentException: wrong number of arguments
- AWS S3 CLI – Could not connect to the endpoint URL
- ExecJS Could not find a JavaScript runtime