Inserting a binary file into a oracle table.

From: Date: Tue, 12 Sep 2000 11:49:48 +0000
Subject: Inserting a binary file into a oracle table.
Groups: php.db 
Request: Send a blank email to php-db+get-2825@lists.php.net to get a copy of this message
Hi all, i'm trying to insert a little binary file into an oracle table. This is my script. (I've compiled php as interpreter -not as apache module-) --- cut here --- #!/usr/local/bin/php <? $fd1=fopen("/usr/bin/chown","r"); $fs1=filesize("/usr/bin/chown"); $content=fread($fd1,$fs1); $string="update table set filecontent=$content where name='a1'"; $conn=ocilogon("user","password","db"); $stmt=ociparse($conn,$string); ociexecute($stmt); fclose($fd1); ocilogoff($conn); ?> --- cut here --- sure i'm doing it in the wrong way. Someone could help me? (As you can suppose, i'm new to oracle...)

« previous php.db (#2825) next »