Changeset 17766
- Timestamp:
- 2009/02/13 21:41:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_4/data/class/helper/SC_Helper_DB.php
r17655 r17766 1202 1202 1203 1203 $max = $objQuery->max($tableName, "rank", $where); 1204 1204 // 値の調整(逆順) 1205 1205 if($pos > $max) { 1206 1206 $position = 1; … … 1210 1210 $position = $max - $pos + 1; 1211 1211 } 1212 1212 1213 1213 //入れ替え先の順位が入れ換え元の順位より大きい場合 1214 1214 if( $position > $rank ) $term = "rank - 1"; … … 1225 1225 $sql.= " AND $where"; 1226 1226 } 1227 1227 if( $position > $rank ) $objQuery->exec( $sql, array($rank, $position)); 1228 1228 if( $position < $rank ) $objQuery->exec( $sql, array($position, $rank)); 1229 1229 // 指定した順位へrankを書き換える。 1230 1230 $sql = "UPDATE $tableName SET rank = ? WHERE $keyIdColumn = ? "; 1231 1231 if($where != "") { 1232 1232 $sql.= " AND $where"; 1233 1233 } 1234 1234 $objQuery->exec( $sql, array( $position, $keyId ) ); 1235 1235 $objQuery->commit(); 1236 1236 } … … 1374 1374 * @return string 指定の都道府県, 支払い方法の配送料金 1375 1375 */ 1376 function sfGetDelivFee($pref, $payment_id = "") { 1376 function sfGetDelivFee($arrData) { 1377 $pref = $arrData['deliv_pref']; 1378 $payment_id = isset($arrData['payment_id']) ? $arrData['payment_id'] : ""; 1379 1377 1380 $objQuery = new SC_Query(); 1378 1381 … … 1444 1447 if (OPTION_DELIV_FEE == 1) { 1445 1448 // 送料の合計を計算する 1446 $arrData['deliv_fee'] 1447 += $this->sfGetDelivFee($arrData['deliv_pref'], 1448 $arrData['payment_id']); 1449 1449 $arrData['deliv_fee'] += $this->sfGetDelivFee($arrData); 1450 1450 } 1451 1451
Note: See TracChangeset
for help on using the changeset viewer.