Re: quote and NULL
| From: | (Stig Sæther Bakken) | Date: | Wed, 29 Aug 2001 17:21:22 +0000 |
| Subject: | Re: quote and NULL | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1720@lists.php.net to get a copy of this message | ||
["Tomas V.V.Cox" <cox@idecnet.com>]
> Is there any problem if DB::quote by default return the NULL string
> also when the value is '' (now it returns NULL only when $var ===
> null) ?
Testing === null is the only correct behaviour as far as I'm
concerned. There's one thing missing though, and that is the
comparison operator in SQL. If you want to compare a field with NULL,
you need to use "IS NULL", while for others you can use "=". We
should have a mechanism for this, or people will have to special-case
NULL values anyway.
- Stig
--
Stig Sæther Bakken <ssb@alltheweb.com>
Fast Search & Transfer ASA, Trondheim, Norway