Hallo Community,
habe folgendes Problem ich bekomme folgende Fehlermeldung
der zuständige code ist folgender:
Ich weiss einfach nicht mehr weiter .
MySQL Version: 5.5.9
5.2.17 (Zend: 2.2.0)
Wäre über jede Hilfestellung dankbar !!!
lg eleven-seven
habe folgendes Problem ich bekomme folgende Fehlermeldung
Code:
[COLOR=#000000][B]1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 9 select count(DISTINCT p.products_id) as total from products_description pd join products_to_categories p2c join products p join (select p.products_id from products p join products_attributes pa on pa.products_id = p.products_id join products_options_values pv on pv.products_options_values_id = pa.options_values_id where pa.options_values_id in (4) and pv.language_id = 2 [/B][/COLOR]
Code:
if (!empty($excluded_options)) $excluded_options_condition = 'and po.products_options_id not in (' . $excluded_options . ')'; // modify options filter join to connect to products_attributes instead of products $option_filter_join = str_replace('x.products_id = p.products_id', 'x.products_id = pa.products_id', $option_filter_join); // 1. get options and values for this catgory $filter_sql = 'select po.products_options_id options_id, po.products_options_name options_name, pv.products_options_values_id options_values_id, pv.products_options_values_name options_values_name, count(pa.products_id) option_values_count from '.TABLE_PRODUCTS_OPTIONS.' po join '.TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS.' pv2po on pv2po.products_options_id = po.products_options_id join '.TABLE_PRODUCTS_OPTIONS_VALUES.' pv on pv.products_options_values_id = pv2po.products_options_values_id join '.TABLE_PRODUCTS_ATTRIBUTES.' pa on pa.options_id = po.products_options_id and pa.options_values_id = pv.products_options_values_id join '.TABLE_PRODUCTS_TO_CATEGORIES.' p2c on p2c.products_id = pa.products_id join '.TABLE_PRODUCTS.' p on p.products_id = pa.products_id '. $option_filter_join .' where p2c.categories_id = ' . $current_category_id . ' and po.language_id = '.(int) $_SESSION['languages_id'].' and pv.language_id = '.(int) $_SESSION['languages_id'].' and p.products_status = 1 '. $excluded_options_condition .' group by 1, 2, 3, 4 order by 1, 4'; // echo $filter_sql; $filter_query = xtDBquery($filter_sql);
MySQL Version: 5.5.9
5.2.17 (Zend: 2.2.0)
Wäre über jede Hilfestellung dankbar !!!
lg eleven-seven
Kommentar