Re: [PHP4BETA] Oracle Problem ????

From: Date: Tue, 28 Mar 2000 07:07:36 +0000
Subject: Re: [PHP4BETA] Oracle Problem ????
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-12720@lists.php.net to get a copy of this message
On Tue, Mar 28, 2000 at 09:50:39AM +0300, Catalin Ciocoiu wrote: > I try to write a php4 script to extract one field from an Oracle > Database. > I execute the follow query with SQLPlus: > > > =========== SqlPlus =============== > SQL> r > 1 select datetime_start_chg from dat_mobile_originated where > 2* rownum<10 > > DATETIME_START_CHG > ~~~~~~~~~~~~~~~~~~~ > 1999-10-26 15:14:17 > 1999-10-26 15:14:03 > 1999-10-26 15:14:18 > 1999-10-26 15:12:17 > 1999-10-26 15:14:17 > 1999-10-26 15:13:43 > 1999-10-26 15:14:00 > 1999-10-26 15:14:18 > 1999-10-26 15:13:52 > > 9 rows selected. > > SQL> > =============================== > > Declaration of field DATETIME_START_CHG is: > DATETIME_START_CHG NOT NULL DATE > > When I try to extract the same data with PHP I can't extract the time > component of the field. > Only date is returned. > > Here is the php script and the results. > > ================ php script =============== > <HTML> > <PRE> > <? > > $conn = OCILogon("*********","******"); > $st = OCIParse($conn,"select datetime_start_chg from > dat_mobile_originated where rownum<10"); > ociexecute($st,OCI_DEFAULT); > > while(ocifetch($st)) > { > $i=OCIResult($st,"DATETIME_START_CHG"); > echo "$i \n"; > } > > ?> > </PRE> > </HTML> > <HTML> > > ================= Output of PHP script ============ > <HTML> > <PRE> > 26-OCT-99 > 26-OCT-99 > 26-OCT-99 > 26-OCT-99 > 26-OCT-99 > 26-OCT-99 > 26-OCT-99 > 26-OCT-99 > 26-OCT-99 > </PRE> > </HTML> > <HTML> > > =================================================== > > My OS is: SunOS 5.5.1 Generic_103640-27 sun4u sparc > and Oracle Version is 8.05 > > > Where can I find a solution of this problem ??? hint: have a look at your NLS_DATE_FORMAT environment-variable. > > > Thank You ! > > -- > Catalin CIOCOIU catalin.ciocoiu@connex.ro > > > > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net > -- Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.version4 (#12720) next »