If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MySQL, PHP and Images

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-30-03, 12:42
JuanPablo JuanPablo is offline
Registered User
 
Join Date: Dec 2003
Posts: 2
MySQL, PHP and Images

Hello people!!!
I really really need some help because i'm new with mysql and php.
I need help in inserting images in a mysql database, getting it and putting it in a web page.
Please help me.
Reply With Quote
  #2 (permalink)  
Old 01-01-04, 12:30
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Re: MySQL, PHP and Images

Quote:
Originally posted by JuanPablo
Hello people!!!
I really really need some help because i'm new with mysql and php.
I need help in inserting images in a mysql database, getting it and putting it in a web page.
Please help me.
I think this post belongs to the PHP section.
Anyway look at: http://www.devarticles.com/c/a/MySQL...PHP_and_MySQL/
Reply With Quote
  #3 (permalink)  
Old 01-01-04, 17:12
sundialsvcs sundialsvcs is offline
Registered User
 
Join Date: Oct 2003
Posts: 706
Lightbulb

My solution to that issue is... don't store the images in the database; store them in a separate directory and locate the images using the database. SQL servers aren't a great place to store large chunks of data. Browsers work best, cache things best, and so-on when the data originates from a file.
__________________
ChimneySweep(R): fast, automatic
table repair at a click of the
mouse! http://www.sundialservices.com
Reply With Quote
  #4 (permalink)  
Old 01-03-04, 18:35
Earl Parker II Earl Parker II is offline
Registered User
 
Join Date: Jun 2003
Posts: 8
I had the same problem a few weeks ago. Here is some code that might help:

echo "<img src='path to/folder/containing/images/$image_name' height=$image_height width=$image_width>";

As sundialsvcs stated, store the image names in the db and the images in a directory on the server. Then all you have to do is read $image_name, $image_height and $image_width from the database and place the above code wherever you want the image(s) to appear.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On