Skip to content

Commit

Permalink
Show query duration for count queries
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
  • Loading branch information
MoonE committed Jul 3, 2024
1 parent aa145f3 commit 610df16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/classes/Display/Results.php
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ private function setDisplayPartsAndTotal(array $displayParts)
if ($printView == '1') {
$displayParts = $this->setDisplayPartsForPrintView($displayParts);
} elseif (
$this->properties['is_count'] || $this->properties['is_analyse']
$this->properties['is_analyse']
|| $this->properties['is_maint'] || $this->properties['is_explain']
) {
$displayParts = $this->setDisplayPartsForNonData($displayParts);
Expand All @@ -658,9 +658,9 @@ private function setDisplayPartsAndTotal(array $displayParts)

// if for COUNT query, number of rows returned more than 1
// (may be being used GROUP BY)
if ($this->properties['is_count'] && $numRows > 1) {
$displayParts['nav_bar'] = '1';
$displayParts['sort_lnk'] = '1';
if ($this->properties['is_count'] && $numRows <= 1) {
$displayParts['nav_bar'] = '0';
$displayParts['sort_lnk'] = '0';
}

// 4. If navigation bar or sorting fields names URLs should be
Expand Down

0 comments on commit 610df16

Please sign in to comment.