- Timestamp:
- 2007/10/29 20:29:57 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/helper/SC_Helper_DB.php
r16582 r16598 1149 1149 // 自身のランクを取得する 1150 1150 $rank = $objQuery->get($tableName, "rank", "$keyIdColumn = ?", array($keyId)); 1151 $max = $objQuery->max($tableName, "rank", $where, array($keyId)); 1151 1152 $max = $objQuery->max($tableName, "rank", $where); 1152 1153 1153 1154 // 値の調整(逆順) … … 1160 1161 } 1161 1162 1162 if( $position > $rank ) $term = "rank - 1"; //入れ替え先の順位が入れ換え元の順位より大きい場合 1163 if( $position < $rank ) $term = "rank + 1"; //入れ替え先の順位が入れ換え元の順位より小さい場合 1163 //入れ替え先の順位が入れ換え元の順位より大きい場合 1164 if( $position > $rank ) $term = "rank - 1"; 1165 1166 //入れ替え先の順位が入れ換え元の順位より小さい場合 1167 if( $position < $rank ) $term = "rank + 1"; 1168 1169 // XXX 入れ替え先の順位が入れ替え元の順位と同じ場合 1170 if (!isset($term)) $term = "rank"; 1164 1171 1165 1172 // 指定した順位の商品から移動させる商品までのrankを1つずらす
Note: See TracChangeset
for help on using the changeset viewer.