Guest User

Untitled

a guest
Jun 1st, 2016
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.86 KB | None | 0 0
  1. import MySQLdb as mysql
  2.  
  3. MYSQL_SERVER = 'localhost'
  4. MYSQL_DB = 'mobileApp'
  5. MYSQL_USER = 'mobileApp'
  6. MYSQL_PASS = 'passwort'
  7.  
  8. nnx = mysql.connect(host=MYSQL_SERVER, user=MYSQL_USER, passwd=MYSQL_PASS, db=MYSQL_DB)
  9. cursor = nnx.cursor()
  10.  
  11. command = 'INSERT INTO `Ingredients` (`idIngredients`, `Name`, `Brennwert`, `Kalorien`, `Protein`, `Kohlenhydrate`, `Zucker`, `Fett`, `Ballaststoffe`, `Broteinheiten`, `Cholesterin`, `Wassergehalt`, `VitaminA`, `VitaminB1`, `VitaminB2`, `VitaminB6`, `VitaminC`, `VitaminE`, `Salz`, `Eisen`, `Zink`, `Magnesium`, `Chlorid`, `Mangan`, `Schwefel`, `Kalium`, `Kalzium`, `Phosphor`, `Kupfer`, `Fluorid`, `Jod`) VALUES (NULL, "arla cultura drik himbeer", 251, 60, 3, 11, NULL, 0.4, 0, 0.9, NULL, 80, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)'
  12. cursor.execute(command)
Add Comment
Please, Sign In to add comment