Python Forum
Telegram bot - Problem with database - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Telegram bot - Problem with database (/thread-28296.html)



Telegram bot - Problem with database - NoNameoN - Jul-13-2020

Hi everybody when i do...
cursor.execute('UPDATE Utenti SET Api_Key = ? WHERE Id = ?;', (Api_Key, chat_id))
cursor.execute('SELECT * FROM Utenti WHERE Id = ' + str(chat_id))
...i haven't problem but if i see inside the db the modify isn't present.. what can I do to solve it?


RE: Telegram bot - Problem with database - Gribouillis - Jul-13-2020

connection.commit() perhaps?