Re: implode() in MDB_QueryTool - decimal-point -> comma

From: Date: Tue, 16 May 2006 09:13:49 +0000
Subject: Re: implode() in MDB_QueryTool - decimal-point -> comma
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24088@lists.php.net to get a copy of this message
Am Montag, 15. Mai 2006 23:19 schrieb Lorenzo Alberton: > Hi Lukas, > > > I see only the two solutions like they have been stated in the bug-report > > http://pear.php.net/bugs/bug.php?id=3021 form others. > > > > 1) to have an "own" implode that checks the type of each value. > > > > function my_implode( $concatStr, $array ) { > > $str = ''; > > foreach( $array as $value ) { > > if( $str !== '' ) $str .= $concatStr; > > $str .= is_double($value) ? floatToStringNoLocale($value) : > > $value; } > > return $str; > > } > > well, it probably is enough, and we shouldn't > need to make those extra metadata calls. > Thanks for your suggestion, I've committed the fix, > can you try the latest CVS version? Hi Lorenzo! _quote() has also to use _floatToStringNoLocale() in case of a float/double because $this->db->getFloatValue() has the same problem. Of course the better place is to make this change is getFloatValue(). But as I can see this code is inside DB/MDB/MDB2 and needs new discussion with that developers. However if I adapt _quote() the QueryTool-code is fine for me. Thank you for the fast fix. lukas

« previous php.pear.general (#24088) next »