RE: [PEAR-DEV] quote and NULL

From: Date: Wed, 29 Aug 2001 16:20:23 +0000
Subject: RE: [PEAR-DEV] quote and NULL
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1719@lists.php.net to get a copy of this message
i agree, especially in the context of a SELECT statement. "SELECT FROM table WHERE col=NULL" or "SELECT FROM table WHERE col=''" will probably not do what you expect it to, whereas "SELECT FROM table WHERE col IS NULL" will probably do what you'd expect. > -----Original Message----- > From: Chuck Hagenbuch [mailto:chuck@horde.org] > Subject: Re: [PEAR-DEV] quote and NULL > > Quoting "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) ? > > '' and NULL are _very_ different things in SQL. Please don't do this. > > -chuck

« previous php.pear.dev (#1719) next »