close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Display dynamic data based on category

Thread began 5/14/2013 2:18 am by Jorge Rivero | Last modified 5/16/2013 12:39 pm by Jorge Rivero | 710 views | 12 replies |

Jorge Rivero

Display dynamic data based on category

I am trying to display data based on category, I have this code in MySQL

SELECT Vendors.VendorID, VendorsCategories.VendCatID, Vendors.Company, Vendors.Contact, Vendors.Phone, Vendors.Website, VendorsCategories.CatName
FROM Vendors LEFT JOIN VendorsCategories ON Vendors.intCatID = VendorsCategories.VendCatID
ORDER BY VendorsCategories.CatName , Vendors.Company ASC

I want to have a result like the following example

Category #1

vendor 1
vendor 2
vendor 3

Category #2

vendor 1
vendor 2

and so on...

I want to display the Category name once for all items in that category.

I hope someone can help me with this

Thanks in advanced

Sign in to reply to this post

Jason ByrnesWebAssist

instead of using a join query for this, you would use a 2 recordsets,

the first recordset will return the categories

the second recordset nested inside the repeat region for the categories will return the items for the current category.

See the following tutorial for details:
http://www.webassist.com/community/tutorials/view_tutorial.php?tid=12

Sign in to reply to this post

Jorge Rivero

Thank you Jason,

I followed this tutorial yesterday, but today, since you have suggested to take a look at it, I have been following the tutorial over and over again, trying all day, and I can't get it work, my situation is a little different than this tutorial but I am doing few thing wrong for sure.

Here is an image of my page http://screencast.com/t/7eeK2rEDa (div tags and recordsets).

I can separate the categories easily because is just a repeat selection of the category recordset, here is an image of what I get back from the recordset when I do that http://screencast.com/t/KZIMggxO

Then wen I do a repeat selection of the nested div with the info from the Vendors recordset, I get this http://screencast.com/t/nWtkrzM7jNHk

Any help will be really appreciated.

Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the page please so i can see the code.

Sign in to reply to this post

Jorge Rivero

Thanks Jason

Here is the page attached

Sign in to reply to this post

Jason ByrnesWebAssist

can you give some more details on the structure of the 2 tables please?

Sign in to reply to this post

Jorge Rivero

What I am trying to do is display the vendors information inside of vendinfoContainer that is placed inside of vendCatContainer this last div should be repeated for each category, and display vendors information for the corresponding category inside.

Sign in to reply to this post

Jason ByrnesWebAssist

I understand what you are trying to do, but i need to know more about the table structure to be able to give advice.

Sign in to reply to this post

Jorge Rivero

I misunderstood your question.

This is the Vendor table http://screencast.com/t/fUEeXoNM it has "intCatID" that is a foreign key http://screencast.com/t/GUwsY6RG1Z7 to Vendors_Categories http://screencast.com/t/SOZiqo6X

hope this helps

Sign in to reply to this post

Jason ByrnesWebAssist

Thats not giving me all the info i need.

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post
loading

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