Right way to set a variable to NULL?
martin at marcher.name
Sat Dec 27 01:05:16 CET 2008
2008/12/26 John Machin <sjmachin at lexicon.net>:
> The above all have the same characteristic: if the input is a zero-
> length string, then NULL is inserted into the database instead of a
> zero-length string. Some folks (not just pedants!) regard that as an
> important difference.
agreed but I understood the OP specifically wanted NULL and not ''.
of course for data gathering in web apps I'd personally make the mail
attribute a NOT NULL and reject anybody who wouldn't give me their
mail address. After all mail is the way to get in touch with my
customers/user if they register on my site, and if it's only for a
password reset link.
You are not free to read this message,
by doing so, you have violated my licence
and are required to urinate publicly. Thank you.
Please avoid sending me Word or PowerPoint attachments.
More information about the Python-list