View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

SQL for Options

Thread began 11/11/2009 3:54 pm by steven348539 | Last modified 11/18/2009 2:55 pm by steven348539 | 2040 views | 10 replies

Eric Mittman

I think that the way you are wanting to do this should work so long as the the sizes table has multiple entries for a given category, one record for each size and price.

If this is the case then on the details page you would want to have a recordset like this:

SELECT items.SizeID, items.ItemID, sizes.*
FROM items JOIN sizes ON items.SizeID = sizes.SizeCatID
WHERE items.ItemID = <your item id>

This should work to create a recordset of size values for the given item. This is the way that you would want to do this if you only had the item's id available to you. If you had the size id from that item available then you could have a much simpler query, it would be like this:

SELECT * FROM sizes
WHERE sizes.SizeCatID = <the size id for the item>

This is probably the best way to go if you can pass along the size id with the item.

The first rs with the join must be crafted in the advanced view, but the second one can be created in the simple recordset view within DW. For the advanced one you would need to make a new SQL variable and then set it's value to the id for the item that is being passed. The simple view recordset can be configured with just some filtering based on the size id from a URL parameter or from a form post.

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