mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-10 05:22:41 +00:00
Adding fix for #2869, fixes count function not escaping "count" properly in pgsql
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5384 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
558c6eb00a
commit
cedf6993b2
1 changed files with 1 additions and 1 deletions
|
@ -1448,7 +1448,7 @@ class Model extends Overloadable {
|
|||
function findCount($conditions = null, $recursive = 0) {
|
||||
$db =& ConnectionManager::getDataSource($this->useDbConfig);
|
||||
|
||||
list($data) = $this->findAll($conditions, 'COUNT(*) AS ' . $db->value('count'), false, null, 1, $recursive);
|
||||
list($data) = $this->findAll($conditions, 'COUNT(*) AS ' . $db->name('count'), false, null, 1, $recursive);
|
||||
|
||||
if (isset($data[0]['count'])) {
|
||||
return $data[0]['count'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue