Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to retrieve data of a product which falls under two categories??

Reply
Thread Tools

How to retrieve data of a product which falls under two categories??

 
 
savvy
Guest
Posts: n/a
 
      05-12-2006
I'm using MS SQL 2000. I developing a shopping cart where on the admin
side when we are inserting or updating the products, there is a chance
that a single product can fall into two categories therefore i'm giving
the users a option of CheckBoxList control for the categories. The
checkboxlist control is Database Databinded with categories.

When a user selects couple of checkboxes, i'm storing both the
categories seperated with a comma in a single field of database but
then when i want retrieve the all products of a particular category,
this approach wont work. Is their any way around for this??

Even though i use CheckboxList control is their any way to retrieve
products of a particular category?? Can i store each checkbox text in a
different row with the same product ID's in a different table and all
the product info in a different table ?? I hope i made myself clear.

Thanks for your help and time in advance.

 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      05-12-2006

The first thing you're doing wrong is violating

1st Normal Form

http://databases.about.com/cs/specif...ucts/g/1nf.htm

I think a better db design is a more appropriate path to getting this
correct.



"savvy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> I'm using MS SQL 2000. I developing a shopping cart where on the admin
> side when we are inserting or updating the products, there is a chance
> that a single product can fall into two categories therefore i'm giving
> the users a option of CheckBoxList control for the categories. The
> checkboxlist control is Database Databinded with categories.
>
> When a user selects couple of checkboxes, i'm storing both the
> categories seperated with a comma in a single field of database but
> then when i want retrieve the all products of a particular category,
> this approach wont work. Is their any way around for this??
>
> Even though i use CheckboxList control is their any way to retrieve
> products of a particular category?? Can i store each checkbox text in a
> different row with the same product ID's in a different table and all
> the product info in a different table ?? I hope i made myself clear.
>
> Thanks for your help and time in advance.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Fastest way to compute dot product (inner product) in Ruby? theosib@gmail.com Ruby 4 11-02-2007 03:24 AM
Product Manager/ Sr. Product Manager padma C++ 0 10-03-2007 12:30 PM
Re: Newbe Question: How do I tell which XP CD goes with which Product Key? pcbutts1 Computer Support 8 07-15-2005 04:22 AM
Retrieve lost product key. =?Utf-8?B?anls?= Microsoft Certification 1 05-04-2004 01:27 AM



Advertisments