#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    28
    Rep Power
    0
    I'm new to Mysql/Databases and am trying to figure out the best way to integrate a large number of images into a database, but need some help.

    Basically what I have is an article/page with text and a number of thumbnail images to go with it. But the actual number of thumbnails in each article will vary quite considerably, from 0 - 30 conceivably.

    I'm not uploading the images to the database, just the image name.

    What is the best way to set this up in MySql. A separate table with a new row for each image?

    Thanks in advance.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    179
    Rep Power
    15
    I just set up a photo archive db that stores the following info in a table:

    1. file name
    2. title (or description)
    3. key words (for searching purposes)
    4. source (photographer's name)
    5. date

    --The file name is unique.
    --I do searches on all info.

    I hope that provides some food for thought.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    London, England
    Posts
    251
    Rep Power
    15
    If you only want each filename/thumbnail to be linked to one story, then the solution is to do as you say. Create a table with one filename on each row and include a field that points to the ID of the story. You can then select all the filenames pointing to the particular story you're interested in, whether there be zero or 1000 of them.

    If a filename can be linked to more than one story then that's a different matter! I can't think of an elegant solution for this. If you work it out let me know as it's similar to a problem I'm trying to solve.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    28
    Rep Power
    0
    Thanks for the advice, each image is linked to only one story so it looks like your solution will work Adrian2.

Similar Threads

  1. PHP and MYSQL to display images
    By foreverdita in forum PHP Development
    Replies: 2
    Last Post: January 23rd, 2004, 08:21 AM
  2. Multiple Imagemaps on non-visiable images?
    By jtenneson in forum HTML Programming
    Replies: 2
    Last Post: November 5th, 2003, 10:32 AM
  3. updating multiple rows (MySQL)
    By Edison in forum PHP Development
    Replies: 2
    Last Post: October 3rd, 2003, 08:05 AM
  4. creating an image out of multiple images
    By piele in forum PHP Development
    Replies: 1
    Last Post: September 30th, 2003, 12:55 PM
  5. Create multiple images (images function)
    By Messner in forum PHP Development
    Replies: 6
    Last Post: July 5th, 2002, 03:28 AM

IMN logo majestic logo threadwatch logo seochat tools logo