New Zenner
- Join Date:
- Feb 2010
- Posts:
- 3
- Plugin Contributions:
- 0
SQL question
SQL ----
$unique_model = $db->Execute("SELECT DISTINCT products_model FROM products");
Display ----
while (!$unique_model->EOF) {
echo $unique_model->fields['products_model'];
$unique_model->MoveNext();
}
This will echo out the names as long as your query is bringing back the distinct values. You can also add code to it such as links. To setup the correct reference you may have to build a more complex query.
Example:
echo '<a href="link code" alt="alt name" />'.$unique_model->fields['products_model'].'</a>';