Jump to content

Storing numbers in a database - and displaying images


lowe_22

Recommended Posts

Hi,

I've run into a spot of difficulty whilst trying to code a script -

I want to display 3 different images x number of times, where x is a number stored in a database.
I'll tell you the context:
I have a database of tournament wins with 4 columns: MemberID (which member has the wins...), 1st Places wins, 2nd place wins, 3rd place wins.
A number is stored in each of the columns representing the number of each place won. I basically want to display an image for each one: 1image for 1st place, 1 image for second etc.. but I want to display that image however many times depending on the number in the database.

For example, a member has 3 1st place wins, I want to display the image for a first place win 3 times on the page.

How could I go about doing this?

Thanks.
Link to comment
Share on other sites

Yea, that helps a lot. thanks very much.

There was one other thing that I could do with some help on. that is as follows:

For every 10 images of a certain kind, a different image is displayed instead.

So, if the member had 14 1st place wins, the browser should print one 10wins image followed by four 1stwins images.
Understand?
Any ideas?

Thanks
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.