Oracle Problem ????

From: Date: Tue, 28 Mar 2000 06:50:39 +0000
Subject: Oracle Problem ????
Groups: php.version4 
Request: Send a blank email to php-version4+get-12718@lists.php.net to get a copy of this message
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 ??? Thank You ! -- Catalin CIOCOIU catalin.ciocoiu@connex.ro

« previous php.version4 (#12718) next »