Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

MySQL Connector could not process parameters

Try this:

for x in data:
    value = "test"
    query = "INSERT INTO test (serial) VALUES (%s)"
    cursor.execute(query,(value,))
    print("Inserted",cursor.rowcount,"row(s) of data.")

Since you are using mysql module, cursor.execute requires a sql query and a tuple as parameters

Tags:

Python

Mysql

Mysql Connector Python

Related

Verifying ID tokens with Firebase Authentication How to make a Floating Action Button in Xamarin Forms What does UseContainerSupport VM parameter do? WebView.loadData not working on Android 9.0 (API-29) Find most unpopulated points in a coordinate system How can I update a table to insert decimal points at a fixed position in numbers? Dynamically replace Image in Lottie animation at runtime Async/Await/then in Dart/Flutter Undefined symbols for architecture arm64 - JSClassCreate NodeJs: fs.stat() or fs.access() to check if a folder exists? R unable to process heavy tasks for many hours Convert Java objects to JSON strings using gson

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy