Solved

What format or data type are images stored in MySQL tables

Posted on 2013-06-28
5
435 Views
Last Modified: 2013-06-28
HI Experts

Can anyone tell me how to convert a jpeg image into some sort of text, that I can then copy and paste into an "SQL insert" or MySQL insert using the GUI?

The reason for this question, is I'd rather use some sort of application to do this, and was hoping there might be an online one to do this.

Any help/direction on either of these questions would be much aprectiated

Thanks
0
Comment
Question by:georgehowell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 5

Expert Comment

by:sriramiyer
ID: 39284593
I believe it is not a wise idea to convert image to text and store it in a MySQL record.  pl. think over is it absolutely needed to do like that?
0
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 250 total points
ID: 39284832
Storing image in a database is a really, really, REALLY BAD IDEA.  However if you want to go that route then you will need to use a blob data type, and pre-process with PHP.  

This outlines how to do it, and points out why it is a bad idea:

http://www.phpriot.com/articles/images-in-mysql
Cd&
0
 

Author Comment

by:georgehowell
ID: 39284923
thanks Cobol for the link.. I'm reading it right now

there's only 6 product thumbnails on the whole site, so it's minimal data.  

Does anyone know if there's any online conversion or downloads to change a jpg to "blob" data-type ?

cheers
0
 
LVL 23

Accepted Solution

by:
nemws1 earned 250 total points
ID: 39284924
I agree with the other comments posted, BTW.

The thing that comes to mind first when reading this is to MIME encode the image and store the result.  It will be all "plain text" (no binary data).  Of course, you need to MIME *de*-code the image once you yank it out of the database.  All this is highly inefficient and will slow down whatever process it is you're trying to do.
0
 

Author Comment

by:georgehowell
ID: 39285001
thanks gents for your help
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question