Reply to Re: Inserting modified image into a database

Re: Inserting modified image into a database new!
by Rocket Dog, 16 years, 3 months ago
In looking at your example code, if I understand you correctly we would need to call the process() function twice if we want to save the file to the server as well as to the database.

First we modify the file and use process($directory) to save the file to the server.

Then, we modify the file again as we did before, and use process() to save the contents of the file to the database as a BLOB.

So we're writing the same code twice (unless of course we create a single function to handle the image modification, and then call that function twice.) Let me know if I understand that correctly.

BTW, the only reason I'm saving the file to the database is because it's part of my masters degree project to compare image retrieval performance between the server and the database. But normally I would never do that in practice.Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important