> Been wondering this for a while now, I can explain how I do it, but 
> I am sure there are better ways.
> ...

Maybe I'm really missing something here but I think that your querying
problem arises from bad data design.  This is what I'd do:

  Product table:

    ProductID
    some other stuff

  Attribute table:

    ProductID
    Attribute

which gives:

    SELECT Product.something Attribute.Attribute
    FROM Product LEFT JOIN Attribute ON (Product.ProductID =
Attribute.ProductID);

Or

  Product table:

    ProductID
    product stuff

  ProdAttr table:

    ProductID
    AttributeID
 
  Attribute table:

    AttributeID
    other attribute stuff

Which makes the query a little more complicated but the attributes a
little more flexible.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to