php3-list | 199908
Date: 08/10/99
- Next message: Jacob Stetser: "[PHP3] Re: : [PHP3] about sendmail and mail()"
- Previous message: Robert Aden: "Re: [PHP3] save a interpeted php3 file as a html file"
- Maybe in reply to: Tom Williamson: "[PHP3] Oracle parsing problem - help?"
- Next in thread: Jesse Swensen: "Re: [PHP3] Oracle parsing problem - help?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Here's the fetch code. I'm using ora_getcolumn to dynamically create my
array. The funny thing is that this same code works on other SQL
statements, it just doesn't work on the one I listed.
$ncols=ora_numcols($mycursor);
while ( ora_fetch($mycursor )) {
for ($i = 0 ; $i < $ncols ; $i++ ) {
$myrow[count($myrow)] = ora_getcolumn($mycursor, $i);
}
$mydata[count($mydata)] = $myrow;
unset($myrow);
}
-----Original Message-----
From: Jesse Swensen <swensenj <email protected>>
To: Tom Williamson <tom.williamson <email protected>>; php3 <email protected>
<php3 <email protected>>
Date: Tuesday, August 10, 1999 5:21 AM
Subject: Re: [PHP3] Oracle parsing problem - help?
>Let's see you fetch code. I would bet you are not fetch the data into an
>array. It should look like
>
> <email protected> = ora_fetch($lda, $sql); or
>($col1, $col2, $col3) = ora_fetch($lda, $sql);
>--
>Jesse Swensen
>swensenj <email protected>
>
>----------
>>From: "Tom Williamson" <tom.williamson <email protected>>
>>To: <php3 <email protected>>
>>Subject: [PHP3] Oracle parsing problem - help?
>>Date: Mon, Aug 9, 1999, 3:07 PM
>>
>
>> I have used SQL and HTML for years but I am a PHP newbie, so if this is a
>> stupid question, I plead ignorance in advance. Please be kind. :)
>>
>> I am having a problem wherein PHP seems to not parse and/or execute
certain
>> Oracle SQL statements correctly. I am using the "ora_" functions and not
>> the "OCI" Oracle 8 function set. Here is an example of a query that does
>> not seem to return the proper values. It runs fine from SQL Plus but
>> returns only a single "0" (zero) from ora_fetch():
>>
>> select count(bat_id) as thecount, sum(bat_count) as thesum,
>> avg(bat_mail_date - bat_rcv_date)*24 as theavg from amazing.batch where
>> bat_pi_id = 1000 and bat_rcv_date > '1-jan-1900' and bat_rcv_date <
>> '31-dec-1999' and bat_mail_date is not null and bat_rcv_date is not null
>>
>> Output from SQL Plus:
>>
>> THECOUNT THESUM THEAVG
>> ---------- ---------- ----------
>> 1 1000 480
>>
>> Output from PHP ora_fetch():
>>
>> 0
>>
>> Has anyone run into behavior like this before?
>>
>> Thanks in advance - Tom
>>
>>
>>
>>
>>
>
>--
>PHP 3 Mailing List <http://www.php.net/>
>To unsubscribe, send an empty message to php3-unsubscribe <email protected>
>To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
>To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
>To contact the list administrators, e-mail: php-list-admin <email protected>
>
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jacob Stetser: "[PHP3] Re: : [PHP3] about sendmail and mail()"
- Previous message: Robert Aden: "Re: [PHP3] save a interpeted php3 file as a html file"
- Maybe in reply to: Tom Williamson: "[PHP3] Oracle parsing problem - help?"
- Next in thread: Jesse Swensen: "Re: [PHP3] Oracle parsing problem - help?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

