Home » Database » DB » Bug #7911
Oracle BLOB Handling Is Missing - Patch Included
Details
| Request #7911 | Oracle BLOB Handling Is Missing - Patch Included |
|---|---|
| Submitted | 2006-06-15 16:55 UTC |
| From | moshe dot ortov at gmail dot com |
| Status | Wont fix |
| Package | DB |
| PHP Version | 5.1.4 |
| OS | Any |
| Roadmaps | (Not assigned) |
Comments
[2006-06-15 16:55 UTC] moshe dot ortov at gmail dot com
Description:
------------
Oracle BLOB support is not present in DB module but is sometimes useful. Patch supplied which will add a further type (the @ character) which will implement Oracle BLOB handling so BLOBs can be stored in an Oracle database.
Test script:
---------------
This is a patch to add Oracle BLOB support to DB.
Patch file is 81 lines long.
Downloadable from
http://www.networksystemssolutions.co.uk/Oracle-BLOB-DB-Patch
Expected result:
----------------
Prepared statements, such as
INSERT INTO table (blobcolumn) VALUES (@)
will now enable a BLOB to be inserted into an Oracle database.
The BLOB data needs to be PACKed first :
e.g.
$rawData = <binary steam of BLOB data>
// Oracle Uses Hex Bytes
$packedData = "0x";
$binaryImage = unpack("H*hex", $rawData);
$packedData .= $binaryImage['hex'];
The $packedData is what is passed as the BLOB value.