Re: [PHP4BETA] Oracle Problem ????
| From: | Catalin Ciocoiu | Date: | Tue, 28 Mar 2000 08:11:35 +0000 |
| Subject: | Re: [PHP4BETA] Oracle Problem ???? | ||
| References: | 1 2 3 4 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12726@lists.php.net to get a copy of this message | ||
Not Work !
I obtained the same result.
This is very strange !
i=YYYY-MM-DD HH24:MI:SS
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
thies@digicol.de wrote:
> On Tue, Mar 28, 2000 at 10:30:00AM +0300, Catalin Ciocoiu wrote:
> > The variable NLS_DATE_FORMAT is not set.
> > $i=getenv("NLS_DATE_FORMAT"); return an empty string.
> >
> > Where can I set this variable and what can put in this variable ???
>
> please set it in your apache startup-script!
>
> i have
>
> NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
>
> set in mine
>
> >
> >
> >
> >
> > thies@digicol.de wrote:
> >
> > > 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
> > >
> > > --
> > > 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
> >
> > --
> > Catalin CIOCOIU catalin.ciocoiu@connex.ro
> >
> >
> >
>
> --
>
> 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
--
Catalin CIOCOIU catalin.ciocoiu@connex.ro