Nathan Brignall Posted July 23, 2008 Share Posted July 23, 2008 Hey guys, Is it possible to send images to a MySQL database? I'm using MySQL version 5.0.45-community-log and PHP 5.2.6. Quote Link to comment Share on other sites More sharing options...
Zwiter Posted July 23, 2008 Share Posted July 23, 2008 it is possible because i have seen tutorials on it, but i have never read them. Do a google search about this. Z. Quote Link to comment Share on other sites More sharing options...
accident Posted July 23, 2008 Share Posted July 23, 2008 Yes, this is what the BLOB data type is for. Or you could base64_encode it to a varchar/text field but this takes more space. So set up a field as a BLOB type, read the contents from the image file as binary and insert the contents into the blob field Quote Link to comment Share on other sites More sharing options...
fenway Posted July 23, 2008 Share Posted July 23, 2008 It's not really a good idea, as max_packet_size can be an issue... use the FS for what it was meant for. Quote Link to comment Share on other sites More sharing options...
secoxxx Posted July 23, 2008 Share Posted July 23, 2008 just send the image name or imahe name and location and store them in a folder, otherwise its like stuffing watermelon into a hose eventually, not good. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.