Jump to content

Table of images


WormTongue

Recommended Posts

I am trying to setup a mysql table that will only hold images. As a webpage is requested, the code will look in the mysql database and pic a random image. My question is 1) is this possible? and 2) how do i go about making my table to store the images and upload the images? Thanks for your help.

Link to comment
Share on other sites

I made a mysql table that held a location name, address, city, state, and a picture for that location. In my Image column in the table I just stored the pathname to the picture I wanted. Storing the actual photo in mysql is possible but it bloats the table.

 

I stored my pictures under images/location on my webhoster\'s server. So say for location #1 I would just store the pathname images/location/picture1.gif in the image column. Location #2 pathname = images/location/picture2.gif and so forth.

 

Hope this helps.

 

JDawg

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.