Hello again, something simple this time:

After a user selects a file from the form, that sleection of his can be found form reading the variable 'filename'

If the filename already exists in to the database i want to update its counter and that is what i'm trying to accomplish by:

-----------
if form.getvalue('filename'):
cur.execute('''UPDATE files SET hits = hits + 1, host = %s, lastvisit = %s WHERE url = %s''', (host, lastvisit, filename) )
-----------

For some reason this never return any data, because for troubleshooting i have tried:

-----------------
data = cur.fetchone()

if data:
        print("something been returned out of this"_
----------------

Since for sure the filename the user selected is represented by a record inside 'files' table why its corresponding counter never seems to get updated?

Thank you.
--
What is now proved was at first only imagined!
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to