use 'count()' + result->get_one() to count images, rather than 'select *' + result->rowcount()...

This commit is contained in:
Shish 2017-08-23 00:42:19 +01:00
parent d875ab66a1
commit 35bd51e513

View file

@ -282,8 +282,7 @@ class Image {
}
else {
$querylet = Image::build_search_querylet($tags);
$result = $database->execute($querylet->sql, $querylet->variables);
return $result->rowCount();
return $database->get_one("SELECT COUNT(*) AS cnt FROM ($querylet->sql) AS tbl", $querylet->variables);
}
}