Projekt

Allgemein

Profil

Revision 4

Unterschiede anzeigen:

includes/extra/default/listing_sql/category_keywords.php
46 46
        $where_str_cat .= " ) ";
47 47
        $listing_sql_categories = "Select * from ".TABLE_CATEGORIES." c LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd on c.categories_id = cd.categories_id where $where_str_cat AND cd.language_id = '".(int)$_SESSION['languages_id']."'";
48 48
        $categories_query = xtc_db_query($listing_sql_categories);
49
        $categories_keyword_content = array();
49
        $categories_keyword_content = array();     
50
        $arr_categories_affected = array();
50 51
        while ($categories = xtc_db_fetch_array($categories_query)) {
51 52
           if(!in_array($categories['categories_id'], $arr_categories_affected)){
52 53
              $arr_categories_affected[]=$categories['categories_id'];
......
101 102
        while ($products_from_keywords = xtc_db_fetch_array($keywords_query)) {
102 103
           $arr_included_products[] = "'" . $products_from_keywords['products_id'] . "'";                  
103 104
        }     
104
        if(count($arr_included_products>0)){
105
        if(count($arr_included_products)>0){
105 106
           $listing_sql = str_replace("WHERE p.products_id IN (", "WHERE p.products_id IN (".join($arr_included_products, ",") . ",", $listing_sql);  
106 107
 
107 108
        }

Auch abrufbar als: Unified diff