Skip to content
Snippets Groups Projects
Commit b95c1876 authored by colemanw's avatar colemanw
Browse files

#2360 - Escape the word `rows` in sql query

parent 4e686626
Branches
Tags
No related merge requests found
......@@ -164,7 +164,7 @@ class Api4SelectQuery {
$this->buildHavingClause();
$this->buildGroupBy();
$subquery = $this->query->toSQL();
$sql = "SELECT count(*) AS `c` FROM ( $subquery ) AS rows";
$sql = "SELECT count(*) AS `c` FROM ( $subquery ) AS `rows`";
}
$this->debug('sql', $sql);
return (int) \CRM_Core_DAO::singleValueQuery($sql);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment