MySQL Questions...NEED HELP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pernks
Forum Newbie
Posts: 10
Joined: Wed May 12, 2004 10:03 am

MySQL Questions...NEED HELP

Post by pernks »

How could I display images shared into mysql.......thanks for your help..
User avatar
PrObLeM
Forum Contributor
Posts: 418
Joined: Sun Mar 07, 2004 2:30 pm
Location: Mesa, AZ
Contact:

Post by PrObLeM »

pull the information (ie the url to the image) from the db and display it with html...

Code: Select all

echo'<img src="' . $url . '">';
pernks
Forum Newbie
Posts: 10
Joined: Wed May 12, 2004 10:03 am

Re: MySQL Questions...NEED HELP

Post by pernks »

OK I TRY IT
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Using blob (Binary Large OBject), you can store the image itself in MySQL. To be honest though, I'm not sure how to do it. I have also heard of a way to 64bit encode an image, and store it in a field of type 'text'. I'd try blob though.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

pickle wrote:To be honest though, I'm not sure how to do it.
Using load_file() mysql function perhaps ;)
Post Reply