Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import MySQLdb as mysql
- MYSQL_SERVER = 'localhost'
- MYSQL_DB = 'mobileApp'
- MYSQL_USER = 'mobileApp'
- MYSQL_PASS = 'passwort'
- nnx = mysql.connect(host=MYSQL_SERVER, user=MYSQL_USER, passwd=MYSQL_PASS, db=MYSQL_DB)
- cursor = nnx.cursor()
- 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)'
- cursor.execute(command)
Add Comment
Please, Sign In to add comment