473,387 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Insert and select images (BLOB) from DB2 using PHP?

DOes anybody have a working example of how do make this work?

I've tried everything I could find, Clara patch, many non-working
examples using pack, baseencode, addslashes, str_replace, bin2hex,
hex2bin, for read only, using different db2 dataypes blob,clob
etc.....I'd post code but I've tried too many to list. just an example
would be excellent.
I've been trying 2 days now.

I know there is a php bug report 25118 http://bugs.php.net/bug.php?id=25118

If I use the DB2 datatype of clob, I can get the insert to work (at
least not produce errors), but getting anything useful back out is
pointless. It seems I can only retrieve 4k of crap (or mabey the insert
only put 4k there). I can read the thing back to a file and look at it,
the first 4k of stuff matches what I input (in this case a 26k jpeg
file), but after that it looks just like random crap including some php
code (pretty funny), so it appears to be padding the file to the proper
length with junk.
datatype of blob produces error on the insert no matter what I try

Any working examples out there? Please please...I really could use some
sleep.

PS, storing on filesystem and putting pointers in DB is not an option in
this case.
Feb 21 '06 #1
0 2370

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ole Hansen | last post by:
Hi, Is it at all possible to insert BLOBs using the Array Interface? Today I have an application using the array interface. It works fine but so far I haven't been using BLOBs. I insert...
2
by: Ole Hansen | last post by:
Hi, Is it possible to insert BLOB data without doing a select first? I have data available and want to insert a row with BLOB data. Should I use the callback function with OCILobWrite() or is...
11
by: Chris Fink | last post by:
I have setup an Oracle table which contains a blob field. How do I insert data into this field using C# and ADO.net?
7
by: gemel | last post by:
I am developing an application that uses SQL 2000 as my source of images. I have successfully created the code to load the images onto the SQL Server and also to retrieve the images into a dataset....
2
by: Luis Mendes | last post by:
How can I read and write images to SQL server to a field with the type "image". CanĀ“t make DataBound work. Thank's in advance, Luis
3
by: meyvn77 | last post by:
Hello - I am looking for the best way to store images in a Access DB. My Idea - I have a table with 150,000 records. These recoreds represent a Crash (Traffic Accident). I have 50 different...
7
by: Kevin Lawrence | last post by:
Hi all I want to do "INSERT INTO Table (Blob) Values('blobdataasstring')". ...rather than using the parameter driven method, is it possible? And if so what encoder do I use to convert the...
6
by: Keith Hughitt | last post by:
Hi all, I've run into a strange error while trying to store some PNG images in a MySQL database using MySQLdb. When I try to insert smaller images (< 64kb or so) everything seems to work fine....
2
by: wizardry | last post by:
hello - i'm trying to insert a blob into my table, it will insert but the string that i insert when i query the inserted data returns null with 0 bytes in the column. I have other tables set...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.