I'v searched throughout this forum and couldn't find an answer.
cur.execute("UPDATE lastran SET job_date=newtimedate WHERE job_name=usrjobname")
Why is my code now working?
The two variables are newtimedate and usrjobname
I'v searched throughout this forum and couldn't find an answer.
cur.execute("UPDATE lastran SET job_date=newtimedate WHERE job_name=usrjobname")
Why is my code now working?
The two variables are newtimedate and usrjobname
I don't know Python, but it seems you're passing your variables as literals... a little Googling tells me this should be it?
cur.execute("UPDATE lastran SET job_date=? WHERE job_name=?", (newtimedate, usrjobname))
See how this person does it: How to see the real SQL query in Python cursor.execute