Actually I'm working on a Python and SQLite based url Shortener that will allow people to shorten their urls. But I'm in a trouble, so thats why I'm here hehe! So, my code is not inserting a thing into the database!
This is the connection and insertion code:
connection = sqlite3.connect(DBSource)
cursor = connection.cursor()
query = "INSERT INTO URLStorage VALUES('{0}','{1}','{2}')".format(urlFinal, urlprocessar, datetime.datetime.now())
#return(query)
cursor.execute(query)
If you want to take a look at the full source code to see if I mess something else, this is the link for it: http://ift.tt/1QS4kP9
Aucun commentaire:
Enregistrer un commentaire