473,320 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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.

May 12 '06 #1
1 1149

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" <jo******@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr 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.

May 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Daniel Tonks | last post by:
First, please excuse the fact that I'm a complete MySQL newbie. My site used forum software that I wrote myself (in Perl) which, up until now, has used flat files. This worked fine, however...
4
by: Bill Stock | last post by:
The few times in the past that I've loaded unbound data, I've tended to cheat and use temp tables (not really unbound) or use code for small datasets. I'm currently involved in a project that...
8
by: Daisy | last post by:
Hi Folks, Got a load of business objects - Product, Price, Offer, FAQ, Description... Product contains collections of the others (eg. Product.Offers is a collection of Offer objects) ...
2
by: Guoqi Zheng | last post by:
Dear sir, New to ASP.NET, help will be appreciated. I need to create a XML file for product feed. In our business, one product always belongs to more than 1 categories. I need to have a XML...
5
by: sutphinwb | last post by:
Hi - This could be a simple question. When I relate two tables in a datasetet, how do I get that relation to show up in a GridView? The only way I've done it, is to create a separate table in the...
4
by: Matt | last post by:
I am no JavaScript guru so please bear with me and be as detailed as possible with your response. I thank you in advance. I have an ASP page that contains form elements. I also have an inline...
1
by: Stinky Pete | last post by:
Morning, The Non-conformance file we use as part of our Corporate GMP Manufacturing complicance has a number of check boxes that users (7) can select when determining what category a...
1
by: wfsmith | last post by:
Sorry for the confusing subject. Here's what im doing: I have a table of products. Products have N categories and subcategories. Right now its 4. But there could be more down the line so it...
1
by: sstidham | last post by:
So my boss has asked me to make him a database so we can sort our Agents by ranking based on their sales. I have managed to get the database to import all the data needed correctly, the issue is now...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.