Changeset 20003


Ignore:
Timestamp:
2011/01/20 05:03:02 (11 years ago)
Author:
Seasoft
Message:

#907(商品名検索で一致なしでエラー画面)改修

File:
1 edited

Legend:

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

    r19746 r20003  
    491491     */ 
    492492    function getProductStatus($productIds) { 
     493        if (empty($productIds)) { 
     494            return array(); 
     495        } 
    493496        $objQuery =& SC_Query::getSingletonInstance(); 
    494         $productStatus = $objQuery->select("product_id, product_status_id", 
    495                                            "dtb_product_status", 
    496                                            'del_flg = 0 AND product_id IN (' . implode(', ', array_pad(array(), count($productIds), '?')) . ')', $productIds); 
     497        $cols = 'product_id, product_status_id'; 
     498        $from = 'dtb_product_status'; 
     499        $where = 'del_flg = 0 AND product_id IN (' . implode(', ', array_pad(array(), count($productIds), '?')) . ')'; 
     500        $productStatus = $objQuery->select($cols, $from, $where, $productIds); 
    497501        $results = array(); 
    498502        foreach ($productStatus as $status) { 
Note: See TracChangeset for help on using the changeset viewer.