Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7560009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:47:13+00:00 2026-05-30T12:47:13+00:00

I am building a database for a website that will be a cataloge of

  • 0

I am building a database for a website that will be a cataloge of products.
I am having a problem with the table of images. I have a php script that resizes the image with three sizes, renames them with a suffix, writes them to a directory and adds a reference to them in a table of images.

I am having trouble figuring out how the thumbnails (the small images) will be associated with the medium and large images since I’m planning to have multiple images for each product. I want to be able to add all thumbnails to a page with a link either to the medium or large image via a php script.

Here is what I have so far,

image-id  product-id  filename              size    caption  width  height  alt
13        1           PassPro150_large.jpg  large   NULL     632    569     NULL
14        1           PassPro150_medium.jpg medium  NULL     250    225     NULL
15        1           PassPro150_small.jpg  small   NULL     115    103     NULL

Is there a standard way to do this? Should I make three tables, one for each size and associate them with a primary-foreign key? I also thought I could do it with string manipulation, replace _small with _large since all images uploaded will have the same postfix. Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T12:47:15+00:00Added an answer on May 30, 2026 at 12:47 pm

    What Joseph said is one solution.
    Or you could create multiple folders different sizes of thumbnails, like thumb_small, thumb_medium and save the images in there with same name.

    You just keep the filename in the database. and when you need to display the image you adjust the url to the particular folder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a web application that will have access to PeopleSoft's database via jdbc.
I am building my own CRM access database that will contain a list of
I'm building a website where I will have users logging into the site from
I'm building a website that will run a series of cron tasks daily to
I'm building a website that will authenticate users via Facebook connect and I'm torn
I'm building a website that prints the content in it's Mysql database to the
I'm building a website that will send an email notification when certain actions are
I'm building a website that is going to import products from several different sources.
I'm building an ASP.NET MVC3 website with an code first database and have the
I'm building a site that will link to various other sites using php scripts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.