cars
====
id
make
model
example:
1 volkswagen jetta
2 volkswagen passat
features
========
id
name
example:
1 a/c
2 leather seats
3 sun roof
cars_features_xref
==================
car_id
feature_id
example:
1 1 (this means the jetta has a/c)
1 3 (this means the jetta (also) has a sun roof)
2 1 (this means the passat has a/c)
2 2 (this means the passat (also) has leather seats)
SQL: (i think this is right; not tested)
[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']select[/span] c.id, c.make, c.model, f.name from cars c, features f, cars_features_xref x where c.id=x.car_id and x.feature_id=f.id [!--sql2--][/div][!--sql3--]