Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mysql.connector
- mydb = mysql.connector.connect(
- host = "localhost",
- user = "perivxup_perisic",
- password = "BkJxt-DseH~N",
- database = "perivxup_lowes"
- )
- mycursor = mydb.cursor()
- sql_formula = "INSERT INTO proba (ID, broj) VALUES (NULL, 1);"
- mycursor.execute(sql_formula)
- mydb.commit()
- sql_formula = "INSERT INTO proba (ID, broj) VALUES (NULL, 2);"
- mycursor.execute(sql_formula)
- mydb.commit()
- sql_formula = "INSERT INTO proba (ID, broj) VALUES (NULL, 3);"
- mycursor.execute(sql_formula)
- mydb.commit()
- sql_formula = "INSERT INTO proba (ID, broj) VALUES (NULL, 4);"
- mycursor.execute(sql_formula)
- mydb.commit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement