"Bowen" <[EMAIL PROTECTED]> wrote:
> boo = raw_input("Sure you want to update password with above details? Y or N:
> ")
>
> if boo == 'y':
if you're asking for Y or N, maybe you should check for Y or N ? or better,
use something like:
if boo.lower() == 'y':
...
or even
if boo.lower().startswith("y"):
...
> db = MySQLdb.connect("copweb2", "******", "******", "*******")
> cursor = db.cursor()
> if cursor.execute("UPDATE teachers SET password = '%s' WHERE
> teacher_code = '%s'" % (h, tc)):
> print "Done"
> else:
> print "Error"
> else:
> print "cancelled"
>
> cursor.close()
what happens if you add
db.commit()
here?
> db.close()
</F>
--
http://mail.python.org/mailman/listinfo/python-list