Python, Mysql, insert NULL

Python_it python_it at hotmail.com
Wed Oct 5 06:52:24 EDT 2005


Python 2.4
MySQL-python.exe-1.2.0.win32-py2.4.zip

How can I insert a NULL value in a table (MySQL-database).
I can't set a var to NULL? Or is there a other possibility?
My var must be variable string or NULL.
Becaus i have a if statement:
if ....
  cursor.execute(".................insert NULL ..............")
if ....
  cursor.execute(".................insert "string" ..............")




More information about the Python-list mailing list