|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I have quite a brainteaser for you all.
On almost every website I create I use a MySQL backend in some form or another. And one of favorite things is MySQL's ability to store entire image files in BLOBs, and then output those with a little PHP. BUT! I have found no way to replace an image BLOB once it has been created. My PHP skills fail miserably. But I know it's possible, because I can do it through PHP MyAdmin. This would be a huge asset to me, and I'm sure many others. So I got an Easter Basket for whoever can solve this one for me. |
|
|||
|
I assume you have some PHP that does an INSERT query to place the image in the BLOB therefore you just need to change the MySQL to issue an UPDATE query with the id of the image to replace.
You could also just change the INSERT to REPLACE providing that the image ID (this is the key you select on) is currently passed to the INSERT query. |
|
|||
|
Thanks Speed. It turns out that I do need the UPDATE function, but for some reason it wasn't working in the same script that updates all the text fields as well. I still haven't figured out how to integrate it the way I need to, but your help led me to the answer I was looking for. Please email me where you'd like the Easter Basket sent!
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |