Fix for:
DBD::mysql::st execute failed: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause [for Statement 'SELECT COUNT(*)
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
$query .= 'WHERE ';
$query .= join ' AND ', @where_strings;
}
- $query .= ' ORDER BY items.cn_sort, itemcallnumber, title';
my $count_query = $select_count . $query;
+ $query .= ' ORDER BY items.cn_sort, itemcallnumber, title';
$query .= " LIMIT $offset, $size" if ($offset and $size);
$query = $select_columns . $query;
my $sth = $dbh->prepare($query);
$query .= 'WHERE ';
$query .= join ' AND ', @where_strings;
}
- $query .= ' ORDER BY items.cn_sort, itemcallnumber, title';
my $count_query = $select_count . $query;
+ $query .= ' ORDER BY items.cn_sort, itemcallnumber, title';
$query .= " LIMIT $offset, $size" if ($offset and $size);
$query = $select_columns . $query;
my $sth = $ldbh->prepare($query);