Changeset 38 for trunk/database_list.php
- Timestamp:
- May 12, 2009, 11:30:51 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/database_list.php
r35 r38 9 9 $DbResult = $this->Database->query('SELECT `TableName`, `Database` FROM `SystemList` WHERE `Id`='.$TableId); 10 10 $DbRow = $DbResult->fetch_assoc(); 11 $TableName = $DbRow['TableName'];12 11 13 $this->Database->insert(array('Table' => $ TableName), $Values);12 $this->Database->insert(array('Table' => $DbRow['TableName'], 'Database' => $DbRow['Database']), $Values); 14 13 return($this->Database->insert_id); 15 14 } … … 19 18 $DbResult = $this->Database->query('SELECT `TableName`, `Database` FROM `SystemList` WHERE `Id`='.$TableId); 20 19 $DbRow = $DbResult->fetch_assoc(); 21 $TableName = $DbRow['TableName']; 22 $this->Database->delete(array('Table' => $TableName, 'Condition' => 'Id='.$ItemId), array('DeletionTime' => 'NOW()')); 20 $this->Database->delete(array('Table' => $DbRow['TableName'], 'Database' => $DbRow['Database'], 'Condition' => 'Id='.$ItemId), array('DeletionTime' => 'NOW()')); 23 21 } 24 22 … … 27 25 $DbResult = $this->Database->query('SELECT `TableName`, `Database` FROM `SystemList` WHERE `Id`='.$TableId); 28 26 $DbRow = $DbResult->fetch_assoc(); 29 $TableName = $DbRow['TableName'];30 27 $this->DeleteItem($TableId, $ItemId); 31 28 $Values['Id'] = $ItemId; 32 $this->Database->replace(array('Table' => $ TableName), $Values);29 $this->Database->replace(array('Table' => $DbRow['TableName'], 'Database' => $DbRow['Database']), $Values); 33 30 } 34 31 }
Note:
See TracChangeset
for help on using the changeset viewer.