Ignore:
Timestamp:
May 8, 2008, 8:48:00 PM (17 years ago)
Author:
george
Message:

Přidáno: Zobrazení prvních textů v seznamu položek ve skupinách.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2/translation.php

    r5 r6  
    4141  }
    4242
    43   function GetTextGroupList($GroupId, $UserId, $Language)
     43  function GetTextGroupList($GroupId, $UserId, $Language, $Page, $ItemPerPage)
    4444  {
    4545    $Result = array();
    46     $DbResult = $this->Database->select('TextGroup', '*', '`Group`='.$GroupId.' AND `User`='.$UserId.' AND `Language`='.$Language);
     46    $DbResult = $this->Database->query('SELECT `TextGroup`.*, (SELECT `Text` FROM `Text` WHERE `Text`.`TranslationGroup` = `TextGroup`.`Id` LIMIT 1) as `Text` FROM `TextGroup`  WHERE `TextGroup`.`Group`='.$GroupId.' AND `TextGroup`.`User`='.$UserId.' AND `TextGroup`.`Language`='.$Language.' LIMIT '.($Page * $ItemPerPage).','.$ItemPerPage);
    4747    //echo($this->Database->LastQuery);
    4848    if($DbResult->num_rows > 0)
     
    5454  }
    5555
     56  function GetTextGroupListCount($GroupId, $UserId, $Language)
     57  {
     58    $Result = array();
     59    $DbResult = $this->Database->select('TextGroup', 'COUNT(*)', '`Group`='.$GroupId.' AND `User`='.$UserId.' AND `Language`='.$Language);
     60    //echo($this->Database->LastQuery);
     61    $DbRow = $DbResult->fetch_array();
     62    return($DbRow[0]);
     63  }
    5664}
    5765
Note: See TracChangeset for help on using the changeset viewer.