Changeset 21410 for branches/version-2_11-dev/data/class/SC_Product.php
- Timestamp:
- 2012/01/17 16:32:25 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/class/SC_Product.php
r21409 r21410 180 180 * @param SC_Query $objQuery SC_Query インスタンス 181 181 * @param array|int $arrProductId 商品ID 182 * @return array 商品一覧の配列 (キー: 商品ID)182 * @return array 商品一覧の配列 183 183 */ 184 184 function getListByProductIds(&$objQuery, $arrProductId = array()) { … … 191 191 192 192 $objQuery->setWhere($where, $arrProductId); 193 $arrProducts = $this->lists($objQuery); 194 195 // 配列のキーを商品IDに 196 $arrTmp = array(); 197 foreach($arrProducts as $arrProduct) { 198 $arrTmp[$arrProduct['product_id']] = $arrProduct; 199 } 200 $arrProducts =& $arrTmp; 201 unset($arrTmp); 202 203 // SC_Query::setOrder() の指定がない場合、$arrProductId で指定された商品IDの順に配列要素を並び替え 204 if (strlen($objQuery->order) === 0) { 205 $arrTmp = array(); 206 foreach ($arrProductId as $product_id) { 207 $arrTmp[$product_id] = $arrProducts[$product_id]; 208 } 209 $arrProducts =& $arrTmp; 210 unset($arrTmp); 211 } 212 213 return $arrProducts; 193 $arrRet = $this->lists($objQuery); 194 return $arrRet; 214 195 } 215 196 … … 683 664 * 商品詳細の SQL を取得する. 684 665 * 685 * @param string $where _products_class 商品規格情報の WHERE 句666 * @param string $where 商品詳細の WHERE 句 686 667 * @return string 商品詳細の SQL 687 668 */ 688 function alldtlSQL($where _products_class = '') {689 $where_clause = '';690 if (!SC_Utils_Ex::isBlank($where _products_class)) {691 $where_clause = 'WHERE ' . $where_products_class;669 function alldtlSQL($where = "") { 670 $where_clause = ""; 671 if (!SC_Utils_Ex::isBlank($where)) { 672 $where_clause = " WHERE " . $where; 692 673 } 693 674 /*
Note: See TracChangeset
for help on using the changeset viewer.
