Re: Bug #2300: Can't select STRING (VARCHAR) values from the Oracle DB
| From: | Thies C. Arntzen | Date: | Wed, 15 Sep 1999 06:39:44 +0000 |
| Subject: | Re: Bug #2300: Can't select STRING (VARCHAR) values from the Oracle DB | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-10921@lists.php.net to get a copy of this message | ||
admin@polad.ru wrote:
>
> From: admin@polad.ru
> Operating system: RedHat Linux 5.0 (kernel 2.0.38)
> PHP version: 3.0.12
> PHP Bug Type: Oracle related
> Bug description: Can't select STRING (VARCHAR) values from the Oracle DB
>
> OCIResult normaly gets the number and date values but it doesn't get varchar values.
sorry, please be more specific:
- what do you expect
- what do you get
tc
>
> $conn = OCILogon("polad_sys", "polad_sys", "POLAD5-TCP.world");
>
> $sql = "select * from test";
> $stat = OCIParse($conn, $sql);
>
> OCIExecute($stat, OCI_DEFAULT);
>
> while (OCIFetch($stat)) {
>
> $ncols = OCINumCols($stat);
> for ( $i = 1; $i <= $ncols; $i++ ) {
> $result = OCIResult($stat, $i); /* !!!! */
> print $result; /* using $result[1] I get the first char of the string */
> echo "<BR>";
> }
> echo "</TR>";
> }
>
> OCIFreeStatement($stat);
> OCILogoff($conn);
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-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