View Single Post
  #1 (permalink)  
Old 07-10-2007, 02:30 AM
siLenTz's Avatar
siLenTz siLenTz is offline
Jr. Programmer
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jun 2007
Posts: 87
iTrader: (0)
siLenTz will become famous soon enoughsiLenTz will become famous soon enough
Icon1 Options & Binary Optimization

Quote:
Originally Posted by siLenTz View Post
I agree, it is a very great solution. However, It still have there own
disadvantage. For example: I am run my own clothes shop. My shop sell
many shirt with many difference colour. There are Red, Yellow, Black, White
and Blue. Now my customers check my website and search for shirt which
is can be Red, Yellow, Black, and it can be mix with those three colour.
So the possible outcome is: R,Y,B,RY,RB,YB,RYB. In this case you using binary
isn't so effective. Imagine if there are over 20 of difference options can
be select more than one and you want to search with keyword OR instead
of AND and it is going to be insane.
To clearlify my post, I will provide some examples:
Here it is my database:

define that BLACK = 1, BLUE = 2, RED = 4, and WHITE = 8:

Code:
Clothes ID     Clothes Colour
1             1 (black)
2             2 (blue)
3             3 (black and blue)
4             5 (black and red)
5             9 (black and white)
6             7 (black blue and red)
7             11 (black blue and white)
8             13 (black red and white)
9             15 (black blue red and white)
Now I want to search any clothes that have black color(some clothes have
multi-colour which also include black colour). I didn't mean it is impossible
but it is just difficult to search.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!

Last edited by siLenTz : 07-10-2007 at 08:17 AM.
Reply With Quote