Changeset 8 for branches/2/translation.php
- Timestamp:
- May 9, 2008, 10:39:00 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2/translation.php
r6 r8 6 6 { 7 7 $Result = array(); 8 $DbResult = $this->Database-> select('TranslationGroup', '*');8 $DbResult = $this->Database->query('SELECT `TranslationGroup`.*, (SELECT COUNT(*) FROM `TextGroup` WHERE `TextGroup`.`Group` = `TranslationGroup`.`Id`) AS `TextCount` FROM `TranslationGroup`'); 9 9 while($DbRow = $DbResult->fetch_array()) 10 10 { … … 44 44 { 45 45 $Result = array(); 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);46 $DbResult = $this->Database->query('SELECT `TextGroup`.*, (SELECT `Text` FROM `Text` WHERE `Text`.`TranslationGroup` = `TextGroup`.`Id` LIMIT 1) as `Text`, (SELECT COUNT(`TextGroup2`.`User`) FROM `TextGroup` AS `TextGroup2` WHERE `TextGroup2`.`Id` = `TextGroup`.`Id`) as `TextCount` FROM `TextGroup` WHERE `TextGroup`.`Group`='.$GroupId.' AND `TextGroup`.`User`='.$UserId.' AND `TextGroup`.`Language`='.$Language.' LIMIT '.($Page * $ItemPerPage).','.$ItemPerPage); 47 47 //echo($this->Database->LastQuery); 48 48 if($DbResult->num_rows > 0) … … 62 62 return($DbRow[0]); 63 63 } 64 65 function GetMultipleText($GroupId, $Index) 66 { 67 $Result = array(); 68 $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`.`Index` = '.$Index.' AND `TextGroup`.`Language` != 1'); 69 //echo($this->Database->LastQuery); 70 if($DbResult->num_rows > 0) 71 while($DbRow = $DbResult->fetch_array()) 72 { 73 $Result[] = $DbRow; 74 } 75 return($Result); 76 } 64 77 } 65 78
Note:
See TracChangeset
for help on using the changeset viewer.