mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 20:42:42 +00:00
Merge pull request #11616 from cakephp/issue-11186
Fix missing field identifier quoting for COUNT(DISTINCT in SQLServer.
This commit is contained in:
commit
df9c7fd96e
2 changed files with 8 additions and 0 deletions
|
@ -383,6 +383,10 @@ class SqlserverTest extends CakeTestCase {
|
|||
$result = $this->db->fields($this->model, null, 'DISTINCT Car.country_code');
|
||||
$expected = array('DISTINCT [Car].[country_code] AS [Car__country_code]');
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = $this->db->fields($this->model, null, 'COUNT(DISTINCT Car.country_code)');
|
||||
$expected = array('COUNT(DISTINCT [Car].[country_code]) AS [Car__country_code]');
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue