Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update binary field

Status
Not open for further replies.

ckennerdale

Programmer
Dec 23, 2000
158
GB
I have written an upload script for adding images to a mysql database in a blob field

I use a command such as
$imagedata2 = addslashes(fread(fopen($nu_userfile, "r"), filesize($nu_userfile)));

to take the image i select from my hard drive an insert into the table. This allworks and isfine,

However,i also have an edit page,and using the inserinto function can edit allfields in my databaseexcept forthe binary one.

I am using the same line ofcode asabove to take the binaty data,but it only deletes the previous image anddoesntreplace with a newone.

has any one had this experience? Caspar Kennerdale
Senior Media Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top