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


Thread began 3/27/2009 1:50 am by endrioam373602 | Last modified 4/10/2009 2:49 pm by endrioam373602 | 8081 views | 16 replies


You would need to create a couple of separate tables; 'Colours' with your colours in, and 'ProductColour' with the joining information of both product and colour.

The 'Colours' table would have colour_id and colour columns.

The 'ProductColour' table would have to consist of an id, colour_id and product_id.

At that point you take your product_id and join it with the colour_id by using the joining table which basically allows you to have one single instance of 'red' in your database that applies to many products.

Basically, you need to create an inner join between the product_id and the colour_id and it's at this point my knowledge gets shaky I'm afraid.

When a user browses a product with multiple colours, you ask the page to take the product_id e.g. 99, look in the ProductColours table (not the colours table) for any instance of product_id 99 and then print to a dropdown menu (or similar) the colour_id's where the records product_id matches 99...

Colours table: colour_id; colour
ProductColours table: ProductColour_id; colour_id; product_id

so the SQL will look like this (I think):

SELECT FROM ProductColours.colour_id, ProductColour.product_id, Colours.colour FROM ProductColours INNER JOIN Colours ON ProductColours.colour_id = Colours.colour_id
WHERE product_id = VALUE

The parameter 'VALUE' then needs the following info:
Type: Numeric
Value: Request("product_id")
Default: %

You then do the same for sizes, and I guess you could also apply the same for stock levels. This is only a sample, and I don't expect it to work... it might do, and that will be nice for you, wont it? If it doesn't, then there is a good ground for somebody else to offer up a bit of advice on how it might be able to work. I am sure that this is fairly rudimentary SQL, but I struggled with it a bit, lost my rag, struggled some more, really spat the dummy, struggled on further, and hey presto, it worked. How, I don't know, but it did :D

The above needs to be applied in the advanced recordset panel in dreamweaver.

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