Re: DB_DataObject and NULL values

From: Date: Tue, 01 Jul 2003 18:39:17 +0000
Subject: Re: DB_DataObject and NULL values
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17918@lists.php.net to get a copy of this message
> hey I've come across a little problem while trying to update a row in > the database with a NULL value. > > what I'm trying to do is basically this: > > $dbObject->Col1 = null; > $dbObject->Col2 = null; > $dbObject->update(); The thing is that you are passing the PHP NULL type. What you probably want to do here is $dbObject->Col1 = 'null'; $dbObject->Col2 = 'null'; $dbObject->update(); thus passing a string which the database will interpret in the correct way. Arnaud.

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