- Timestamp:
- 2012/03/26 21:44:52 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php
r21623 r21684 71 71 72 72 // テーブルが無ければエラー 73 if (!in_array($table_name, $objQuery->listTables())) return false;73 if (!in_array($table_name, $objQuery->listTables())) return false; 74 74 75 75 // 正常に接続されている場合 … … 1064 1064 1065 1065 //入れ替え先の順位が入れ換え元の順位より大きい場合 1066 if ($position > $rank) $term = 'rank - 1';1066 if ($position > $rank) $term = 'rank - 1'; 1067 1067 1068 1068 //入れ替え先の順位が入れ換え元の順位より小さい場合 1069 if ($position < $rank) $term = 'rank + 1';1069 if ($position < $rank) $term = 'rank + 1'; 1070 1070 1071 1071 // XXX 入れ替え先の順位が入れ替え元の順位と同じ場合 … … 1078 1078 } 1079 1079 1080 if ($position > $rank) $objQuery->exec($sql, array($rank + 1, $position));1081 if ($position < $rank) $objQuery->exec($sql, array($position, $rank - 1));1080 if ($position > $rank) $objQuery->exec($sql, array($rank + 1, $position)); 1081 if ($position < $rank) $objQuery->exec($sql, array($position, $rank - 1)); 1082 1082 1083 1083 // 指定した順位へrankを書き換える。
Note: See TracChangeset
for help on using the changeset viewer.
