projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e68662
)
dev/core#2360 - Escape the word `rows` in sql query
author
Coleman Watts
<coleman@civicrm.org>
Thu, 4 Feb 2021 23:10:42 +0000
(18:10 -0500)
committer
Coleman Watts
<coleman@civicrm.org>
Thu, 4 Feb 2021 23:12:35 +0000
(18:12 -0500)
Civi/Api4/Query/Api4SelectQuery.php
patch
|
blob
|
blame
|
history
diff --git
a/Civi/Api4/Query/Api4SelectQuery.php
b/Civi/Api4/Query/Api4SelectQuery.php
index 20b8286e6dd095d81f1bc014ade2efe3af9172e8..3aacf3b1e5aa9fffd86646d3d4135f8a9d9bd883 100644
(file)
--- a/
Civi/Api4/Query/Api4SelectQuery.php
+++ b/
Civi/Api4/Query/Api4SelectQuery.php
@@
-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);