Changeset 30 for types


Ignore:
Timestamp:
Dec 16, 2008, 8:15:34 AM (16 years ago)
Author:
george
Message:
  • Přidáno: Podpora pro určování v definicích krom tabulky také jméno databáze a jméno primárního identifikačního sloupce.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • types/PointerOneToOne.php

    r29 r30  
    2323        {
    2424          //print_r($Type);
    25           $DbResult = $Database->select($List['TableName'], '*', 'Id='.$Item['Value']);
     25          $DbResult = $Database->select(array('Database' => $List['Database'], 'Table' => $List['TableName'], 'Condition' => 'Id='.$Item['Value']));
    2626          $DbRow = $DbResult->fetch_assoc();
    2727          $DefinitionItem = array('Name' => $Index, 'Type' => $Item['Type'], 'Caption' => $Item['TextBefore'], 'Value' => $DbRow[$Index], 'SourceTable' => $List['Id'], 'SourceItemId' => 0);
     
    3434    if($Columns == '') $Columns = 'Id AS Name, Id';
    3535      else $Columns = 'CONCAT('.$Columns.') AS Name, Id';
    36     $DbResult = $Database->select($TargetTable, $Columns, 'Id='.$Item['Value']);
     36    $DbResult = $Database->select(array('Database' => $List['Database'], 'Table' => $TargetTable, 'Columns' => $Columns, 'Condition' => 'Id='.$Item['Value']));
    3737    //echo($Database->LastQuery);
    3838    if($DbResult->num_rows > 0)
Note: See TracChangeset for help on using the changeset viewer.