PDA

View Full Version : Improve Product Attributes/Item Editor



michael_s
02-14-2007, 12:00 PM
I love the idea of this cont., Sergey Polischuk has a small SQL mistake in his cont.

on line 33 written:
$suboptions = tep_db_query("SELECT DISTINCT POV.products_options_values_id, POV.products_options_values_name FROM products_options_values POV, products_options_values_to_products_options POVtoPO WHERE language_id = '" . $languages_id . "' AND POVtoPO.products_options_id = '" . $options_values['products_options_id'] . "' AND POVtoPO.products_options_values_id = POV.products_options_values_id ORDER BY POV.POV.products_options_values_id");

the last sql line have an extra POV, it should be replace with this SQL:

$suboptions = tep_db_query("


SELECT DISTINCT
POV.products_options_values_id,
POV.products_options_values_name
FROM
products_options_values POV,
products_options_values_to_products_options POVtoPO
WHERE
language_id = '" . $languages_id . "'
AND
POVtoPO.products_options_id = '" . $options_values['products_options_id'] . "'
AND
POVtoPO.products_options_values_id = POV.products_options_values_id
ORDER BY
POV.products_options_values_id");

More... (http://www.oscommerce.com/community/contributions,1397)