Re: DB/DB_oci8 question

From: Date: Mon, 26 Nov 2001 09:34:09 +0000
Subject: Re: DB/DB_oci8 question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-567@lists.php.net to get a copy of this message
Karsten Kraus wrote: > > Hi list, > > I'm not sure if I am right here with this one: > > I'm using the PEAR-DB-Class (DB_oci8-backend) > to connect (now wonder - an Oracle 8i DB). > It works quite fine, but now I have one little prob... > all the values I get from the DB_Result->fetchRow(DB_FETCHMODE_ASSOC) > are strings! Is that an error in my code or is it a general problem? > I just want my integers and floats/doubles back ;-( > > Anyone? All the data returned by PHP's database functions are (AFAIK) returning strings. This is mainly because PHP's integer type is more limited than for example Oracle's numeric types. Fixing this raises a fundamental problem: PHP needs to have type information from your database. This can be done in several ways, but they all have their little or big gotchas, so we've chosen not to do it. So for now you have to tell your app what types you expect, and cast where necessary. - Stig

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