Changeset 873 for trunk/Common/VCL/Database.php
- Timestamp:
- Apr 6, 2020, 11:17:40 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/VCL/Database.php
r738 r873 28 28 29 29 $ColumnSQL = array(); 30 foreach ($this->Columns as $Column)30 foreach ($this->Columns as $Column) 31 31 { 32 32 $ColumnSQL[] = $Column->Name; … … 35 35 36 36 // Get total filtered item count in database 37 if ($this->Filter != '')37 if ($this->Filter != '') 38 38 { 39 39 $Query = 'SELECT COUNT(*) FROM (SELECT '.$ColumnSQL.' FROM '.$this->SQL.') AS `TS` '.$this->Filter; … … 46 46 $this->Rows = array(); 47 47 $VisibleItemCount = 0; 48 if (($this->SortOrder != 0) and ($this->SortOrder != 1)) $this->SortOrder = 0;49 //if ($this->SortColumn)48 if (($this->SortOrder != 0) and ($this->SortOrder != 1)) $this->SortOrder = 0; 49 //if ($this->SortColumn) 50 50 $this->SortColumn = $this->Columns[0]->Name; 51 51 $this->OrderSQL = ' ORDER BY `'.$this->SortColumn.'` '.$this->OrderDirSQL[$this->SortOrder]; … … 54 54 $this->Filter.' '.$this->OrderSQL.$SQLLimit; 55 55 $DbResult = $this->Database->query($Query); 56 while ($DbRow = $DbResult->fetch_assoc())56 while ($DbRow = $DbResult->fetch_assoc()) 57 57 { 58 if (method_exists($this->OnRowDraw[0], $this->OnRowDraw[1]))58 if (method_exists($this->OnRowDraw[0], $this->OnRowDraw[1])) 59 59 $DbRow = call_user_func($this->OnRowDraw, $DbRow); 60 60 $this->Rows[] = $DbRow; … … 62 62 } 63 63 $Row = '<td colspan="'.count($this->Columns).'" style="text-align: right;">Zobrazeno <strong>'.$VisibleItemCount.'</strong>'; 64 if ($this->Filter != '') $Row .= ' z filtrovaných <strong>'.$TotalFilteredCount.'</strong>';64 if ($this->Filter != '') $Row .= ' z filtrovaných <strong>'.$TotalFilteredCount.'</strong>'; 65 65 $Row .= ' z celkem <strong>'.$TotalCount.'</strong>'; 66 66 $ListView->Rows[] = $Row; 67 67 $Output = parent::Show(); 68 return ($Output);68 return ($Output); 69 69 } 70 70 }
Note:
See TracChangeset
for help on using the changeset viewer.