RE: [PEAR-DEV] RFC: slight modification to the get*Value() methods

From: Date: Mon, 30 Dec 2002 12:43:56 +0000
Subject: RE: [PEAR-DEV] RFC: slight modification to the get*Value() methods
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-11956@lists.php.net to get a copy of this message
> The current behavior of getTextValue ist hat it cant handle SQL NULL > at all. You have to do that outside of MDB. I see. > Here goes the list: > > 1) > // input > $text = NULL; > var_dump($mdb->getTextValue($text)); > > // old output > string(2) "''" > // new output > string(4) "NULL" > > > 2) > // input > $text = 'NULL'; > var_dump($mdb->getTextValue($text)); > > // old and new output > string(6) "'NULL'" > > > about 1) > This will result in the field being set to NULL (as in the SQL NULL) > in the DB > > > About 2) > This will result in the field being set to the string NULL in the DB > (not SQL NULL) Well, I think I like more #1, for it stores a SQL NULL value in the DB, but I think that having a NULL const back (not a string) would be the best option. Don't know if this is difficult to implement, though (I didn't checked the source about this). As a matter of fact, if a NULL const is not feasible, I'd prefer an empty string instead of the 'NULL' string if in the db there's a SQL NULL value... Just my 0.02$ Regards, Lorenzo --- [Quipo ISP - Questa E-mail e' stata controllata dal programma Declude Virus] [Quipo ISP - This E-mail was scanned for viruses by Declude Virus]

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