Restoring previous patch to DboMssql

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7580 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-09-09 05:41:51 +00:00
parent dbeb3af384
commit ee0e81406c

View file

@ -546,9 +546,9 @@ class DboMssql extends DboSource {
$offset = intval($offset[1]) + intval($limitVal[1]);
$rOrder = $this->__switchSort($order);
list($order2, $rOrder) = array($this->__mapFields($order), $this->__mapFields($rOrder));
return "SELECT * FROM (SELECT {$limit} * FROM (SELECT TOP {$offset} {$fields} FROM {$table} {$alias} {$joins} {$conditions} {$order}) AS Set1 {$rOrder}) AS Set2 {$order2}";
return "SELECT * FROM (SELECT {$limit} * FROM (SELECT TOP {$offset} {$fields} FROM {$table} {$alias} {$joins} {$conditions} {$group} {$order}) AS Set1 {$rOrder}) AS Set2 {$order2}";
} else {
return "SELECT {$limit} {$fields} FROM {$table} {$alias} {$joins} {$conditions} {$order}";
return "SELECT {$limit} {$fields} FROM {$table} {$alias} {$joins} {$conditions} {$group} {$order}";
}
break;
case "schema":
@ -566,7 +566,6 @@ class DboMssql extends DboSource {
${$var} = "\t" . join(",\n\t", array_filter(${$var}));
}
}
echo "CREATE TABLE {$table} (\n{$columns});\n{$indexes}";
return "CREATE TABLE {$table} (\n{$columns});\n{$indexes}";
break;
default: