atnisbet
Joined: 09 Nov 2007 Posts: 1 Location: Kalispell MT
|
Posted: Fri Nov 09, 2007 6:48 pm Post subject: inserting images into an Oracle 10g DB using MDB2 |
|
|
Hi,
I am having difficulty getting a blob to insert properly into my database
I am using file_get_contents to copy the image file data , then I am attempting the following.
$statement = $mdb2->prepare('insert into
file_in_db(databytes,path,owner,version,mimetype) values(?,?,?,?,?)',
array('blob','text','text','integer','text'));
$owner = "EPG-CHANICON";
$mime_type = "image/png";
//$file_contents is the image file data produced by
get_file_contents('image file path')
$paramater_values =
array($file_contents,$file_path,$owner,$version,$mime_type);
When I execute this code I get an unknown MDB2 error and
[Native message: ORA-00932: inconsistent datatypes: expected BLOB got NUMBER
Does anyone have any ideas about what I am doing wrong?
Thanks. |
|