Skip to main content
Known Participant
December 31, 2012
Question

Who can I do this?

  • December 31, 2012
  • 1 reply
  • 928 views

Ok I am helping a friend with a website for a local ski shop to sell online. I have done dynamic sites before and have managed to figure things out most of the time by searching....but I am really butting my head against the wall. Here is what I need to do.(I am using .ASP and Access DB)


On the admin side he will be able to input new inventory such as skis. Every brand of skis has different lengths, If I create a multi-choice drop menu and insert that into the DB it gives me the following in one field in the DB...skiLength: 160 cm, 161 cm, 162 cm, 163 cm


Ok so how do I display that on the front end so it will allow shoppers to select from an individual length values that are available. I can only get it to return like this, when I query the DB. How can I split this into individual sli lengths?

Ski Lengths: 160 cm, 161 cm, 162 cm, 163 cm

In the DB the fields looks like this

I know that I can do this if I added individual fields for each length, but there has to be an easier way with ASP code


Check this link to see what I am talking about on a front side. It lists the sizes that are available and allows it to be passed on to a cart as a unique value


Elan Amphibio Waveflex 78 Ti Skis with ELX 11.0 Fusion Bindings 2013


thanks for the help..


theDogger

This topic has been closed for replies.

1 reply

Participating Frequently
January 1, 2013

>I know that I can do this if I added individual fields for each

>length, but there has to be an easier way with ASP code

You wouldn't want to do that, but your current database design is not correct. Currently you have more than one value in a field (skiLength) which is a basic normalization violation. You just need to include one length in the field and have separate rows for each combination, or create a separate table for that.

What is the basic workflow a user would use to select skis?

Known Participant
January 1, 2013

Thanks for the help....but to add to it...as you stated..."You wouldn't want to do that, but your current database design is not correct. Currently you have more than one value in a field (skiLength) which is a basic normalization violation."

I understand that, that was a result of trying to use a multi-select menu. When submitted it puts it all into the one field. Are you suggesting that I have 40 field for ski lengths that range from 155-220?

I know with ASP that you can take a field from a DB and do a either a SPLIT or ARRAY or maybe both together with the data from a single field that is common delimited.

or

Are you suggesting a reference table? Still every ski added has a different number of lengths.

Check out the link above to the ski site that has the individual lengths that each have their own valve when selected to added to the cart.

How would you structure the DB then? maybe seeing it will make the light go off!!!!

theDogger

Known Participant
January 1, 2013

Ok got the DB figured out. I added a reference table for the skiLength like this

Now I believe that I need to creat a new table that will hold this info. so I can pass it on to the PayPal cart. Any thoughts?

theDogger