I'm almost finished with the coding on my clothing e-commerce site, but I'm
running into a few minor snags.
When dealing with images, I usually just add a few image fields in the main
table, image1,2,3,etc. It usually works fine and I built this stupidly
elaborate process for updating and deleting them. But this clothing db is a
little different and the image setup needs to be done right for it all to work
as I need.
Everything revolves around a model of clothing. The tblprodmodels table has:
prodmodelcode-PK varchar
prodsellprice
title
category
etc.
I also have a tblavailablecolors with
availablecolorID - PK (int-autnum)
prodmodelcode - FK from tblprodmodels
colorname FK from tblallcolors
tblallcolors is just a lookup or validation table.
Everything works great with me looping available colors into tblavailable
colors with a multiple select menu like so:
<!--- Insert into available colors table --->
<cfquery datasource="#DSN#">
INSERT INTO tblavailablecolors (colorname, prodmodelcode)
VALUES ('#FORM.prodcolor#', #FORM.model#)
</cfquery>
The problem arises with having, say 10 filefields to upload to my db.
I'm uploading and saving each filename with no problem, but how do I loop the
filenames into the table?
Actually, I need a new linking table. tblavailableimages? Hell, I'm having a
brainfart here! How should I tie in the images for a model? And tie it with a
color at the same time?
GRRRRR!!!
Will
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189841
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54