close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Another query quandary

Thread began 9/14/2011 3:38 pm by Jared Lui | Last modified 9/14/2011 6:40 pm by Jared Lui | 838 views | 2 replies

Jared Lui

Another query quandary

Once again because of my clients poor database design I need help trying to solve a puzzle.

Instead of having a separate Images table linked to the Item table, we have 11 image columns in the Item table AND 11 thumbnail columns.
(looks like this:
ID | ItemName | Image1 | Thumb1 | Image2 | Thumb2 | Image3 | Thumb3 | etc.

On the Item Details page we are displaying the large view of the first image. And originally the page had 10 hard coded places for the remaining 10 images displaying the thumbs and using a javascript displaying the full size images onclick.

This would actually work if each line item had 11 images but they don't. So what happens is most pages end up having broken images. I put a band-aid on it by creating a "No Image" image and displaying that for now. Tacky but better than it was.

Create a query (and/or php) that allows me to use only one <img src> instance and repeats itself if an image is found in the next image column and so on. This way some pages may have 10 thumbs and others may only have 2 or 3. Hopefully that makes sense.

I've tried several lightbox and image viewer scripts but all of them just create slide shows from images in a directory. I need this to be dynamic.

I appreciate all advice of how to do this or better suggestions.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...