Ian, Thank You!
http://63.144.103.199/products/index.cfm?n1ID=5&n2ID=46&n3ID=148

cant really even to attempt to explain the db structure...
never worked with arrays or structures.
i do appreciate it..


On Tue, May 13, 2008 at 2:12 PM, Ian Skinner <[EMAIL PROTECTED]> wrote:

> Paul Ihrig wrote:
> > lets try this....
> > productTable
> > pId, acList
> > 1.............3,5,7
> > 2.............2,3
> >
> > accessoryTable
> > aID, Products
> > 2.............1,2,3
> > 3.............3,4
> > 5.............2
> > 7.............12,15, et..
> >
> > the user basically selects aa aid from the accessories table
> > in the form of a check box.
> > and ascociates as many id's containg producta [which are accesories] to
> what
> > ever real product he wants..
> >
> Normalized Database Design Best Pratice
> ProductTable-Accessory Join
> Product ID
> AccessoryID
>
> 1 3
> 1 5
> 1 7
> 2 2
> 2 3
>
> AccessoryTable_Product Join
> 2 1
> 2 2
> 2 3
> 3 3
> 3 4
> 5 2
> 7 12
> 7 15
>
> Are these some type of recipical thing?  Are are these two different
> relationships?
>
> > this really does seem to work quite well.
> >
> For now.  But if you have to maintain and enhance this application it
> will bite you in the behind someday.  There is a very good reason that
> 50 years of database design has been working this way and I don't see it
> changing any time soon.
>
> > i was just trying to look through all the stabndard functions out there
> to
> > remove duplicates.
> > listToArray throws me a error converting simple something to
> something...
>
> Don't for an array it is not going to get you the consilidation you
> want.  Just create a structure, loop over the valueList() result
> creating a node for  each value then extrat the list.  Structures can
> not have key duplicates they will get consilidated into one key.
>
> <cfset something = structNew()>
> <cfloop list="#valueList(aQuery.aColumn)#" index="value">
>  <cfset something[value] = true>
> </cfloop>
> <cfoutput>#structKeyList(something)#</cfoutput>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305199
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to