473,287 Members | 1,588 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,287 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 1147

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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...

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.