import mysql
      
      # db = mysql.connector.connect(...)
      cursor = db.cursor()
      stmt = "INSERT INTO table (cols) VALUES (%s, %s)"
      cursor.execute(stmt, (values))
      db.commit()
      cursor.close()
      Python language logo

      Insert data into MySQL

      mysql
      Python public recipes

      Raw insertion of value into a MySQL database

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.