[thelist] accessing globla JS array from function

Matt Warden mwarden at gmail.com
Sun Jul 8 01:46:17 CDT 2007


On 7/8/07, Brian Cummiskey <brian at hondaswap.com> wrote:
> i would like to work with
>
> sku styleID
>
> and join to a new styles table
>
> syleID color size
>
>
> But as i write this, it doesn't seem like this is going to help me any.
> All I'm doing is adding a join, and i end up with the same issue of
> multiple colors and multiple sizes.

Yes, I don't think this really helps you any. What I was getting at is
more along the lines of:

COLOR
--------------
colorDesc
colorNum

SIZE
--------------
sizeDesc
sizeNum

STYLE
--------------
id
parentSKU
SKU
colorNum
sizeNum


Now, in your two dropdown scenario, you are populating the second
dropdown based on a size and a parentSKU (or color and parentSKU, I
can't remember which):

select c.colorNum, c.colorDesc
from COLOR c
inner join STYLE s on s.colorNum=c.colorNum
and parentSKU='234234' and sizeNum=3
order by c.colorNum

To get the correct SKU:

select SKU
from STYLE
where parentSKU='234234' and sizeNum=3 and colorNum=2


-- 
Matt Warden
Cincinnati, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.



More information about the thelist mailing list