mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge pull request #1628 from ravage84/sqlserver-elseif
Replaced two elseifs by if in sqlserver datasource
This commit is contained in:
commit
8f2bd51834
1 changed files with 4 additions and 2 deletions
|
@ -538,7 +538,8 @@ class Sqlserver extends DboSource {
|
|||
WHERE _cake_paging_.{$rowCounter} > {$offset}
|
||||
ORDER BY _cake_paging_.{$rowCounter}
|
||||
";
|
||||
} elseif (strpos($limit, 'FETCH') !== false) {
|
||||
}
|
||||
if (strpos($limit, 'FETCH') !== false) {
|
||||
return "SELECT {$fields} FROM {$table} {$alias} {$joins} {$conditions} {$group} {$order} {$limit}";
|
||||
}
|
||||
return "SELECT {$limit} {$fields} FROM {$table} {$alias} {$joins} {$conditions} {$group} {$order}";
|
||||
|
@ -573,7 +574,8 @@ class Sqlserver extends DboSource {
|
|||
public function value($data, $column = null) {
|
||||
if ($data === null || is_array($data) || is_object($data)) {
|
||||
return parent::value($data, $column);
|
||||
} elseif (in_array($data, array('{$__cakeID__$}', '{$__cakeForeignKey__$}'), true)) {
|
||||
}
|
||||
if (in_array($data, array('{$__cakeID__$}', '{$__cakeForeignKey__$}'), true)) {
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue