SHARE
TWEET

Untitled

a guest Dec 31st, 2018 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import mysql.connector
  2.  
  3. mydb = mysql.connector.connect(
  4.     host = "localhost",
  5.     user = "perivxup_perisic",
  6.     password = "BkJxt-DseH~N",
  7.     database = "perivxup_lowes"
  8. )
  9.  
  10. mycursor = mydb.cursor()
  11.  
  12. sql_formula = "INSERT INTO proba (ID, broj) VALUES (NULL, 1);"
  13. mycursor.execute(sql_formula)
  14. mydb.commit()
  15.  
  16. sql_formula = "INSERT INTO proba (ID, broj) VALUES (NULL, 2);"
  17. mycursor.execute(sql_formula)
  18. mydb.commit()
  19.  
  20. sql_formula = "INSERT INTO proba (ID, broj) VALUES (NULL, 3);"
  21. mycursor.execute(sql_formula)
  22. mydb.commit()
  23.  
  24. sql_formula = "INSERT INTO proba (ID, broj) VALUES (NULL, 4);"
  25. mycursor.execute(sql_formula)
  26. mydb.commit()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top