Solved

What format or data type are images stored in MySQL tables

Posted on 2013-06-28
5
434 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 May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
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…

734 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