- Timestamp:
- 2012/02/06 21:38:41 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php
r21445 r21446 1073 1073 1074 1074 //入れ替え先の順位が入れ換え元の順位より大きい場合 1075 if( $position > $rank) $term = "rank - 1";1075 if($position > $rank) $term = "rank - 1"; 1076 1076 1077 1077 //入れ替え先の順位が入れ換え元の順位より小さい場合 1078 if( $position < $rank) $term = "rank + 1";1078 if($position < $rank) $term = "rank + 1"; 1079 1079 1080 1080 // XXX 入れ替え先の順位が入れ替え元の順位と同じ場合 … … 1087 1087 } 1088 1088 1089 if( $position > $rank) $objQuery->exec( $sql, array($rank + 1, $position));1090 if( $position < $rank) $objQuery->exec( $sql, array($position, $rank - 1));1089 if($position > $rank) $objQuery->exec($sql, array($rank + 1, $position)); 1090 if($position < $rank) $objQuery->exec($sql, array($position, $rank - 1)); 1091 1091 1092 1092 // 指定した順位へrankを書き換える。 … … 1096 1096 } 1097 1097 1098 $objQuery->exec( $sql, array($position, $keyId));1098 $objQuery->exec($sql, array($position, $keyId)); 1099 1099 $objQuery->commit(); 1100 1100 }
Note: See TracChangeset
for help on using the changeset viewer.
