Changeset 29 for lists/SystemListItem.php
- Timestamp:
- Dec 9, 2008, 1:24:32 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lists/SystemListItem.php
r28 r29 3 3 class ListSystemListItem 4 4 { 5 function RebuildOrder( )5 function RebuildOrder($List) 6 6 { 7 7 global $Database; 8 8 9 $Database->query('UPDATE SystemListItem AS Table1 SET Sequence = (SELECT COUNT(*) FROM (SELECT * FROM SystemListItem) AS Table2 WHERE ((Table2.Sequence < Table1.Sequence) OR ((Table1.Sequence = Table2.Sequence) AND (Table2.Id < Table1.Id))))'); 9 $Database->query('SET @I = 0;'); 10 $Database->query('UPDATE `SystemListItem` SET `Sequence` = (@I := @I + 1) WHERE `List`='.$List.' ORDER BY `Sequence`;'); 10 11 } 11 12 … … 15 16 16 17 //print_r($Parameters); 17 $DbResult = $Database->query('SELECT DbDataType FROM SystemTypeWHERE Id='.$Parameters['Type']);18 $DbResult = $Database->query('SELECT `DbDataType` FROM `SystemType` WHERE Id='.$Parameters['Type']); 18 19 //echo($Database->LastQuery); 19 20 $DbRow = $DbResult->fetch_assoc(); 20 $DbResult = $Database->query('SELECT TableName FROM SystemListWHERE Id='.$Parameters[$Parameters['Column']]);21 $DbResult = $Database->query('SELECT `TableName` FROM `SystemList` WHERE Id='.$Parameters[$Parameters['Column']]); 21 22 //echo($Database->LastQuery); 22 23 $DbRow2 = $DbResult->fetch_assoc(); … … 24 25 //echo($Database->LastQuery); 25 26 26 $this->RebuildOrder( );27 $this->RebuildOrder($Parameters['List']); 27 28 } 28 29 29 30 function OnEdit($Parameters) 30 31 { 31 $this->RebuildOrder( );32 $this->RebuildOrder($Parameters['List']); 32 33 } 33 34 34 35 function OnDelete($Parameters) 35 36 { 36 $this->RebuildOrder( );37 $this->RebuildOrder($Parameters['List']); 37 38 } 38 39 }
Note:
See TracChangeset
for help on using the changeset viewer.