Page 1 of 1
How can I store an image to the database's field ?
Posted: Sat Jul 05, 2008 5:33 pm
by Mds
Hi friend.
I want to store an image to the MySql database's filed?
I don't know how I can do it
Can you help me ?

Re: Hw can I store an image to the database's field ?
Posted: Sat Jul 05, 2008 5:36 pm
by jaoudestudios
Convert it to a base64 string - be warned it will be big!
Why not just have an upload directory?
Re: How can I store an image to the database's field ?
Posted: Sat Jul 05, 2008 5:41 pm
by Mds
Why not just have an upload directory?
Is it better ?
Re: How can I store an image to the database's field ?
Posted: Sat Jul 05, 2008 5:49 pm
by Mds
Convert it to a base64 string
OK, Do you have any code for encoding an image to the string and decoding it ?
Re: How can I store an image to the database's field ?
Posted: Sat Jul 05, 2008 6:32 pm
by jaoudestudios
Its more the norm to use an upload directory.
I have the code for the conversion somewhere, I will try and dig it out tomorrow.
Re: How can I store an image to the database's field ?
Posted: Sat Jul 05, 2008 7:07 pm
by Mds
I have the code for the conversion somewhere, I will try and dig it out tomorrow.
Thank you.