Ignore:
Timestamp:
Nov 25, 2008, 5:12:10 PM (16 years ago)
Author:
maron
Message:

Struktura databáze

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3/class/translation.php

    r35 r38  
    77 
    88        // constructor
    9         function translation($id, $database, $GetText = true)
     9        function translation($id, $database, $Gettext = true)
    1010        { // BEGIN constructor
    1111                $this->id = $id;
    1212                $this->database = $database;
    1313                $this->GetData();
    14                 if ($GetText and isset($this->data)) $this->GetText();
     14                if ($Gettext and isset($this->data)) $this->Gettext();
    1515        } // END constructor
    1616       
    1717        function GetData()
    1818    { // BEGIN function GetData
    19       $Query = $this->database->query('SELECT *,(SELECT Id FROM `TextGroup` WHERE
     19      $Query = $this->database->query('SELECT *,(SELECT Id FROM `textGroup` WHERE
    2020       `Index` = `cz`.`Index` AND `Group` = `cz`.`Group` AND `Language` = 1)
    21         as en_Id FROM TextGroup as cz WHERE Id="'.$this->id.'"');
     21        as en_Id FROM textGroup as cz WHERE Id="'.$this->id.'"');
    2222      if($Query->num_rows > 0) {
    2323        $Row = $Query->fetch_array();
     
    3434    } // END function SetData
    3535       
    36         function GetText()
    37     { // BEGIN function GetText
    38         $Query = $this->database->query("SELECT `Text`,`Translation`.`Name`, `Translation`.`MangosColumn` FROM `Text`
    39 JOIN `Translation` ON `Translation`.`Id` = `Text`.`GroupItem`
    40  WHERE `TranslationGroup` = ".$this->id."");
     36        function Gettext()
     37    { // BEGIN function Gettext
     38        $Query = $this->database->query("SELECT `text`,`translation`.`Name`, `translation`.`MangosColumn` FROM `text`
     39JOIN `translation` ON `translation`.`Id` = `text`.`GroupItem`
     40 WHERE `translationGroup` = ".$this->id."");
    4141        while ($Row = $Query->fetch_array()) {
    42                 $this->text[$Row['Name']] = $Row['Text'];
     42                $this->text[$Row['Name']] = $Row['text'];
    4343        }       
    4444        $this->data['text'] = $this->text;
    45     } // END function GetText
     45    } // END function Gettext
    4646       
    4747  } // END class translation
Note: See TracChangeset for help on using the changeset viewer.