PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
inserting images into an Oracle 10g DB using MDB2

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database
View previous topic :: View next topic  
Author Message
atnisbet



Joined: 09 Nov 2007
Posts: 1
Location: Kalispell MT

PostPosted: Fri Nov 09, 2007 6:48 pm    Post subject: inserting images into an Oracle 10g DB using MDB2 Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
fercho



Joined: 20 Jun 2008
Posts: 1

PostPosted: Fri Jun 20, 2008 7:21 pm    Post subject: Reply with quote

Did you success inserting the image in oracle with mdb2?
If so, can you show us a code snippet?

thanks in advance
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software