Python_it wrote: > I know how to insert values in a database. > That's not my problem! > My problem is how i insert NULL values in de mysql-database. > None is een object in Python and NULL not. > None is not converted to NULL? > Table shows None and not NULL!
None is converted to mysql's NULL and vice versa. It sounds you are passing the *string* "None" to mysql, with it isn't the same thing. Adapting the Laszlo's example already posted: cursor.execute("insert into tablename(fieldname) values (%s)", [None]) HTH. -- deelan, #1 fan of adriana lima! <http://www.deelan.com/> -- http://mail.python.org/mailman/listinfo/python-list