Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-11 Thread B. Aerts
Karl, I'm somewhat limited to reading posts, so I might have missed something, but can you explain why you wanted to avoid the 3rd table solution ? Because depending on that question, I can offer two other solutions, but they have their own limitations. Solution 1: the "2,5nd" table. you cr

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-11 Thread Karl DeSaulniers
Yeah, I was being somewhat facetious about the colors of a shirt. :) I agree on the items and attributes drill-down before implementation though. There will be more than T-Shirts. Watches, book-covers, etc, etc. So I need to find a general logic to cover the items and attributes of each item

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-11 Thread Karl DeSaulniers
Ok, thanks. On Jan 11, 2012, at 11:53 AM, Peter Lind wrote: *snip* How does set() know the difference between say the first row (1) + the fifth row (5) and the second row (2) + fouth row (4) in the bit set? The sum of both are the same. I am sure I am congfusing something. Ummm ... if

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-11 Thread Peter Lind
*snip* > > How does set() know the difference between say > the first row (1) + the fifth row (5) and the second row (2) + fouth row (4) > in the bit set? The sum of both are the same. > I am sure I am congfusing something. > Ummm ... if you're asking how set figures out how bitmasks differ, then

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-11 Thread Karl DeSaulniers
On Jan 11, 2012, at 3:29 AM, Karl DeSaulniers wrote: On Jan 11, 2012, at 12:45 AM, Peter Lind wrote: On Jan 11, 2012 7:13 AM, "Karl DeSaulniers" wrote: On Jan 10, 2012, at 10:49 PM, Karl DeSaulniers wrote: On Jan 10, 2012, at 9:30 AM, B. Aerts wrote: On 08/01/12 23:35, Karl DeSauln

Re: [PHP-DB] Storing multiple items in one MySQL field?

2012-01-11 Thread Karl DeSaulniers
On Jan 11, 2012, at 12:45 AM, Peter Lind wrote: On Jan 11, 2012 7:13 AM, "Karl DeSaulniers" wrote: On Jan 10, 2012, at 10:49 PM, Karl DeSaulniers wrote: On Jan 10, 2012, at 9:30 AM, B. Aerts wrote: On 08/01/12 23:35, Karl DeSaulniers wrote: On Jan 8, 2012, at 10:36 AM, Bastien wrot