note 10168 added to OCIBindByName
| From: | gmarcos at netspace dot com dot mx | Date: | Sat, 16 Dec 2000 16:04:25 +0000 |
| Subject: | note 10168 added to OCIBindByName | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8782@lists.php.net to get a copy of this message | ||
to load an image from oracle:
<?
Header("Content-Type: image/png");
$conn = OCILogon("user","passwd","bd");
$stmt = OCIParse($conn,"select picture
from table_with_picture ");
$picture = OCINewDescriptor($stmt,OCI_D_LOB);
OCIDefineByName($stmt,"PICTURE",&$picture);
OCIExecute($stmt);
while(OCIFetch($stmt)){
}
OCIFreeStatement($stmt);
$fp = fopen ("/directory/picture.tif","wb");
fwrite($fp,$picture);
fclose($fp);
passthru("/usr/bin/X11/convert /directory/picture.tif png:-");
?>
This work for blobs.
bye
http://www.php.net/manual/function.ocibindbyname.php