Re: oracle large objects
| From: | David Newcomb | Date: | Thu, 27 Jul 2000 11:16:49 +0000 |
| Subject: | Re: oracle large objects | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1565@lists.php.net to get a copy of this message | ||
Thies,
In your example getimg.php
<?php
Header("content-type: image/jpeg");
if (!isset($id)) $id = 10;
$conn = ociplogon("digicol","digicol","voyager.");
$stmt = ociparse($conn,"select clob from oci8test where id = :ID");
ocibindbyname($stmt,":ID",&$id,-1);
if (!ociexecute($stmt)) { print "execution failed"; exit(); }
ocifetchinto($stmt, &$arr,OCI_ASSOC);
echo $arr["CLOB"]->load();
?>
How is this better than:
<?php
Header("content-type: image/jpeg");
if (!isset($id)) $id = 10;
$conn = ociplogon("digicol","digicol","voyager.");
$stmt = ociparse($conn,"select clob from oci8test where id = $id");
if (!ociexecute($stmt)) { print "execution failed"; exit(); }
ocifetchinto($stmt, &$arr,OCI_ASSOC);
echo $arr["CLOB"]->load();
?>
Is there some other reason for binding as apposed to actually inserting the
varible, wouldn't this bind and be even quicker?
David
--
Just got back from my holiday!
----- Original Message -----
From: <thies@digicol.de>
To: jeff <jeff@surfrat.com>
Cc: <php-db@lists.php.net>
Sent: Thursday, July 20, 2000 12:52 PM
Subject: Re: [PHP-DB] oracle large objects
> see sample
>
>