Ignore:
Timestamp:
Dec 8, 2008, 11:06:23 AM (16 years ago)
Author:
george
Message:
  • Upraveno: Systém ukládání dat do databáze přepracován na jednodušší. Původní záměr počítal s verzováním položek seznamů čímž se komplikovaly SQL dotazy. Systém sledování změn bude později řešen přes tabulku Audit.
  • Odebráno: Sloupce tabulek Author, ItemId, CreationTime, DeletionTime, ValidtTimeFrom a ValidTimeTo.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lists/SystemListItem.php

    r27 r28  
    77    global $Database;
    88
    9     $Database->query('UPDATE SystemListItem AS Table1 SET Sequence = (SELECT COUNT(*) FROM (SELECT * FROM SystemListItem) AS Table2 WHERE (Table1.ItemId = Table2.ItemId) AND ((Table2.Sequence < Table1.Sequence) OR ((Table1.Sequence = Table2.Sequence) AND (Table2.Id < Table1.Id))))');
     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))))');
    1010  }
    1111
     
    1515
    1616    //print_r($Parameters);
    17     $DbResult = $Database->query('SELECT DbDataType FROM SystemType WHERE ItemId='.$Parameters['Type'].' ORDER BY Id DESC LIMIT 1');
     17    $DbResult = $Database->query('SELECT DbDataType FROM SystemType WHERE Id='.$Parameters['Type']);
    1818    //echo($Database->LastQuery);
    1919    $DbRow = $DbResult->fetch_assoc();
    20     $DbResult = $Database->query('SELECT TableName FROM SystemList WHERE ItemId='.$Parameters[$Parameters['Column']].' ORDER BY Id DESC LIMIT 1');
     20    $DbResult = $Database->query('SELECT TableName FROM SystemList WHERE Id='.$Parameters[$Parameters['Column']]);
    2121    //echo($Database->LastQuery);
    2222    $DbRow2 = $DbResult->fetch_assoc();
Note: See TracChangeset for help on using the changeset viewer.