Changeset 38 for trunk/database_list.php


Ignore:
Timestamp:
May 12, 2009, 11:30:51 AM (16 years ago)
Author:
george
Message:
  • Přidáno: Typy Color pro výběr barvy a Text pro psaní obsáhlejších textů.
  • Opraveno: Ukládání položek do jiných databází než v které je systém.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/database_list.php

    r35 r38  
    99    $DbResult = $this->Database->query('SELECT `TableName`, `Database` FROM `SystemList` WHERE `Id`='.$TableId);
    1010    $DbRow = $DbResult->fetch_assoc();
    11     $TableName = $DbRow['TableName'];
    1211
    13     $this->Database->insert(array('Table' => $TableName), $Values);
     12    $this->Database->insert(array('Table' => $DbRow['TableName'], 'Database' => $DbRow['Database']), $Values);
    1413    return($this->Database->insert_id);
    1514  }
     
    1918    $DbResult = $this->Database->query('SELECT `TableName`, `Database` FROM `SystemList` WHERE `Id`='.$TableId);
    2019    $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()'));
    2321  }
    2422
     
    2725    $DbResult = $this->Database->query('SELECT `TableName`, `Database` FROM `SystemList` WHERE `Id`='.$TableId);
    2826    $DbRow = $DbResult->fetch_assoc();
    29     $TableName = $DbRow['TableName'];
    3027    $this->DeleteItem($TableId, $ItemId);
    3128    $Values['Id'] = $ItemId;
    32     $this->Database->replace(array('Table' => $TableName), $Values);
     29    $this->Database->replace(array('Table' => $DbRow['TableName'], 'Database' => $DbRow['Database']), $Values);
    3330  }
    3431}
Note: See TracChangeset for help on using the changeset viewer.