[PHP] php mysql blob fields

2001-11-21 Thread Rodrigo Peres
Hi, I have a table in mysql that stores some images my fields in this table are: ImageID,Image_Name, Image_Size, Image_Type, Image_Data (this is the blob). The problem is, when i insert a new image everything goes fine, but I can't update it!!! Why? to insert I'm using this if($image != none) {

Re: [PHP] php mysql blob fields

2001-11-21 Thread Mark
a bunch of things: 1) when you read the image you need to use rb mode since it's binary data 2) addslashes() isn't good enough. try mysql_escape_string instead. 3) the way you're doing it the handle to the image file never gets fclosed(), I don't know if that's really a problem tho 4) if your