Jul-13-2018, 08:40 AM
I am trying to insert a row into a table with this code:
query="INSERT INTO Members VALUE ('"+args["first"].value+"','"+args["last"].value+"','"+mac+\ "','"+args["email"].value+"',false,'','');" try: rows=cur.execute(query) print("Success - ",rows) except (MySQLdb.Error,MySQLdb.Warning) as e: print("Error: [%d] - %s" % (e.args[0], e.args[1]))I am getting the "Success" output with 1 row. However, when I manually do a "select * from Members" the empty set is returned. Obviously in spite of the row count being 1, nothing was added to the table. I have no clue how to debug this since it looks like a success from Python. Can someone explain how this is possible or how to debug it? TIA.