close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

multiple items in same field; how to dispay them on page?

Thread began 1/12/2021 6:59 am by SCar87011738 | Last modified 1/12/2021 9:58 am by Ray Borduin | 136 views | 1 replies |

SCar87011738

multiple items in same field; how to dispay them on page?

Hello,
I have a database containing a field (categories) that contains multiple values (category ids) comma separated (i.e.: 1,3,4,5,7,9,13,,,)

As an example, imagine a table similar to this:

name - category
name1 - 1,2,3,6,7
name2 - 4,5,6,7
name3 - 7,8
and so on...

Consider another table containing all categories:

cat_id (id) - cat_name (name of category)
1 - category 1
2 - category 2
3 - category 3
4 - category 4
5 - category 5
6 - category 6
7 - category 7
...

How can I display the catogories in dreamweaver?

I would like to display them as:
name1
category 1 | category 2 | category 3 | category 6 | category 7

name2
category 4 | category 5 | category 6 | category 7 |

name3
category 7 | category 8 |

I would create two recordsets: one that gets the correct record and one that gets all categories.

Then I would explode the cat_id field and loop the values linking them to the rs_category fields.

Would this work?
Or what is the best method to handle this scenario?

TIA
tony

Sign in to reply to this post

Ray BorduinWebAssist

Two recordsets would be the way to do it and should work.

Sign in to reply to this post
Did this help? Tips are appreciated...

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

Content

rating

Layout

rating

Ease of use

rating

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