[Zope] None Object and None String

Cornel Nitu c.nitu at finsiel.ro
Wed Feb 9 11:23:21 EST 2005


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 at 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 )



More information about the Zope mailing list