Changeset 15 for database_list.php
- Timestamp:
- Oct 19, 2008, 8:16:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
database_list.php
r13 r15 15 15 $Values['ItemId'] = $AutoincrementId + 1; 16 16 $this->Database->insert($TableName, $Values); 17 return($Values['ItemId']); 17 18 } 18 19 19 20 function DeleteItem($TableName, $Id) 20 21 { 21 $this->Database->update($TableName, 'Id='.$Id, array('DeletionTime' => 'NOW()')); 22 $DbResult = $this->Database->select($TableName, 'Id', 'ItemId='.$Id.' ORDER BY Id DESC LIMIT 1'); 23 $DbRow = $DbResult->fetch_assoc(); 24 $this->Database->update($TableName, 'Id='.$DbRow['Id'], array('DeletionTime' => 'NOW()')); 22 25 } 23 26 24 27 function EditItem($TableName, $Values, $Id) 25 28 { 26 $DbResult = $this->Database->select($TableName, 'ItemId', 'Id='.$Id); 27 $DbRow = $DbResult->fetch_assoc(); 28 $Values['ItemId'] = $DbRow['ItemId']; 29 $this->DeleteItem($TableName, $Id); 30 $Values['ItemId'] = $Id; 29 31 $Values['Author'] = $this->System->Modules['User']->User['Id']; 30 32 $Values['CreationTime'] = 'NOW()';
Note:
See TracChangeset
for help on using the changeset viewer.