3 Years
Discussion Span
Last Post by pixelsoul


INSERT INTO funny_people (nose, ear, brain)
VALUES ("Gangotri troll nose", "Gangotri hairy ear", NULL);

Edited by pixelsoul

Votes + Comments
Haha, made me laugh

Oh!! Very funny..!! Its an inteview question.
I mean if they were talking about in picture format or any else then which type of variable we have to use??

Edited by Gangotri


Yeah, well the question wasn't a very good one, and stunk of a trolling. Now that I understand that you really did have an honest query here...

If I was asked how to store an image in MySQL, I would probably respond with "I can tell you how, but the question should be why?". It's really not a good practice/solution, and should be avoided. What you should do is store the images in directories, and then store their location and other data in the database.

But I digress, if you were going to store an image in the database, it should be stores as a blob or longblob.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.