if s == None: return s = "NULL" db.query("insert into <table> values ('%s')" % s) Cornel At 17:51 2/9/2005, you wrote:
I have a Zope session variable that is set to None. When I update my MySQL database and set the value of one of my fields to the value of this session variable, the value is set to the string 'None'. Anyone encountered a similar problem? I would think that the None object would translate to the NULL database constant and not the string with value 'None'. Any help would be appreciated. Thanks.
- Asad _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )