Table lookups?

4 posts by 2 authors in: Forums > CMS Builder
Last Post: May 16, 2009   (RSS)

By ncasares - May 8, 2009

I'm trying to use CMS Builder to create a photo manager CMS for my client. Here is what I need to accomplish:

- Photos can be uploaded and thumb-nailed - CHECK
- Photos can be tagged with a number and category - CHECK
- Photos can have multiple descriptions in multiple categories - HERE'S WHERE I'M STUCK

The problem is that I need a field that will let my client add multiple descriptions to. Each description needs to be associated with a category. The end goal is that a single photo can be listed in multiple categories by linking from one or more of the photos descriptions.

I think I'm getting stuck on the relation between tables here. I believe I need a second table for descriptions that references the 'photos' table. But then how would I go about referencing a photo from the descriptions table?

Are relationships between tables even possible in CMS Builder?

Any and all help is appreciated.

Re: [ncasares] Table lookups?

By ncasares - May 11, 2009

I did some thinking about this over the weekend and here's as far as I've gotten.

I think this can be accomplished with 3 tables:

- Photos
- Categories
- Descriptions

In the Descriptions table there would be 3 fields for description, category and photo number. The category and photo number fields would be looked up from their respective tables.

Each entry in the Descriptions table would be tied to a specific photo. With this relationship is it possible to retrieve the link to the photo based on the photo number?

I'm stuck on the viewer code that would make this happen.

Thanks.

Re: [ncasares] Table lookups?

By ross - May 13, 2009

Hi there.

Thanks for hanging on :).

I am curious if there would be a finite number of categories or would that be changing fairly consistently?

What I am thinking is you could just have a description field on your image section for each category.

Then, when you are on the viewer page, you just need to pull in the appropriate field.

So anytime you are on the category a list page, or detail page, you know to pull in the category a field from your image.

Does that sound like it would work? Let me know what you think ;).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/