Ignore:
Timestamp:
2011/11/10 07:59:22 (12 years ago)
Author:
Seasoft
Message:

#1536 (商品一覧画面 パラメータ NOSTOCK_HIDDEN = true で DB エラーが発生する)

Location:
branches/version-2_11-dev/data/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/class/SC_Product.php

    r21315 r21320  
    664664     * 商品詳細の SQL を取得する. 
    665665     * 
    666      * @param string $where 商品詳細の WHERE 句 
     666     * @param string $where_products_class 商品詳細の WHERE 句 
    667667     * @return string 商品詳細の SQL 
    668668     */ 
    669     function alldtlSQL($where = "") { 
    670         $where_clause = ""; 
    671         if (!SC_Utils_Ex::isBlank($where)) { 
    672             $where_clause = " WHERE " . $where; 
     669    function alldtlSQL($where_products_class = '') { 
     670        $where_clause = ''; 
     671        if (!SC_Utils_Ex::isBlank($where_products_class)) { 
     672            $where_clause = 'WHERE ' . $where_products_class; 
    673673        } 
    674674        /* 
  • branches/version-2_11-dev/data/class/helper/SC_Helper_DB.php

    r21319 r21320  
    657657        // 在庫無し商品の非表示 
    658658        if (NOSTOCK_HIDDEN) { 
    659             $sql_where_dtl = 'stock_max >= 1 OR stock_unlimited_max = 1'; 
     659            $sql_where_dtl = 'stock >= 1 OR stock_unlimited = 1'; 
    660660            $from = $objProduct->alldtlSQL($sql_where_dtl); 
    661661        }else{ 
    662             $from = " dtb_products as alldtl "; 
     662            $from = 'dtb_products as alldtl'; 
    663663        } 
    664664 
Note: See TracChangeset for help on using the changeset viewer.