Storing binary files in Oracle BLOB fields

From: Date: Tue, 16 May 2000 05:16:21 +0000
Subject: Storing binary files in Oracle BLOB fields
Groups: php.general 
Request: Send a blank email to php-general+get-83@lists.php.net to get a copy of this message
I want to store JPEG images in an Oracle BLOB field (or a LONG RAW field, whichever will work better) via PHP, but I'm having trouble getting my INSERT statement to work. So far I've been trying mostly with LONG RAW because it seems simpler. What's happening is that ora_parse() won't parse my SQL statement containing the binary data to be inserted - it keeps giving Oracle errors like 'missing right parenthesis' or 'SQL statement not terminated correctly' - things I would normally trace to a special character not escaped within a string in the SQL statement. But I've tried just about every possible combination of addslashes($binary_string) and ereg_replace("'", "''", $binary_string) that I can think of, and it keeps giving me the same errors. I haven't yet been able to store a file successfully. Has anybody done this who could show me how it's done? I'm using PHP 3.0.12. TIA, Carl

« previous php.general (#83) next »