Hello everybody,
I would try to be as clear as possible (Bad english).
I need to select products options with:
$sql_spec = "SELECT ProductID FROM table Where CategoryID = '$category'";
$query_spec = mysql_query($sql_spec) or die("Séléction des données de Produit Voc impossible.<br>" . mysql_error());
while ($spec = mysql_fetch_array($query_spec)) {......
After I have done the selection I need, with the ProductID that the selection returns ($spec[0]) I need to select the option from another table with:
$sql_spec_2 = "SELECT HeaderVocID FROM Tablespec Where ProductID = '$spec[0]'";
Then it returns all value of the selected products. Some of these products have the same options. But each options should be listed only 1 time.....
In resume: Each options should be listed 1time only and not 2/3/4......... The equivalent option should exist only 1 time in the final list.