| List: | General Discussion | « Previous MessageNext Message » | |
| From: | John Craig | Date: | April 27 1999 3:51pm |
| Subject: | Re: [PHP3][MySQL] Upload file into database | ||
| View as plain text | |||
> I have a MySQL database and I want to upload pictures into a blob >attribute via web. I know how to upload a file but I don't know how to >insert it into my blob. don't know if it's the best way to do it, but seems to work OK. $fp = fopen('big.file.jpg', 'r'); $jpg = fread($fp, filesize('big.file.jpg)); fclose($fp); $db->query("update table set blob_field = '".base64_encode($jpg)."' where ... JC
| Thread | ||
|---|---|---|
| • [PHP3][MySQL] Upload file into database | Philippe | 27 Apr |
| • Re: [PHP3][MySQL] Upload file into database | John Craig | 27 Apr |
| • Re: [PHP3][MySQL] Upload file into database | Philippe | 27 Apr |
| • Re: [PHP3][MySQL] Upload file into database | unknown | 27 Apr |
| • Re: [PHP3][MySQL] Upload file into database | Philippe | 27 Apr |
| • Re: [PHP3][MySQL] Upload file into database | John Craig | 27 Apr |
