mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Merging in MS SQL fixes from 1.1
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3591 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
03ec6ccb2a
commit
49d8dac242
1 changed files with 3 additions and 3 deletions
|
@ -207,7 +207,7 @@ class DboMssql extends DboSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = false;
|
$fields = false;
|
||||||
$cols = $this->fetchAll("SELECT COLUMN_NAME as Field, DATA_TYPE as Type, COL_LENGTH('" . $model->tablePrefix . $model->table . "', COLUMN_NAME) as Length, IS_NULLABLE As [Null], COLUMN_DEFAULT as [Default], COLUMNPROPERTY(OBJECT_ID('" . $model->table . "'), COLUMN_NAME, 'IsIdentity') as [Key], NUMERIC_SCALE as Size FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '" . $model->table . "'", false);
|
$cols = $this->fetchAll("SELECT COLUMN_NAME as Field, DATA_TYPE as Type, COL_LENGTH('" . $this->fullTableName($model, false) . "', COLUMN_NAME) as Length, IS_NULLABLE As [Null], COLUMN_DEFAULT as [Default], COLUMNPROPERTY(OBJECT_ID('" . $this->fullTableName($model, false) . "'), COLUMN_NAME, 'IsIdentity') as [Key], NUMERIC_SCALE as Size FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '" . $this->fullTableName($model, false) . "'", false);
|
||||||
|
|
||||||
foreach($cols as $column) {
|
foreach($cols as $column) {
|
||||||
$fields[] = array(
|
$fields[] = array(
|
||||||
|
@ -218,7 +218,7 @@ class DboMssql extends DboSource {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->__cacheDescription($model->tablePrefix . $model->table, $fields);
|
$this->__cacheDescription($this->fullTableName($model, false), $fields);
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ class DboMssql extends DboSource {
|
||||||
$data = $this->boolean((bool)$data);
|
$data = $this->boolean((bool)$data);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$data = addslashes($data);
|
$data = stripslashes(r("'", "''", $data));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return "'" . $data . "'";
|
return "'" . $data . "'";
|
||||||
|
|
Loading…
Add table
Reference in a new issue