More explicit fetch mode in Mysql datasource

This commit is contained in:
Jose Lorenzo Rodriguez 2012-01-08 18:46:42 -04:30
parent 8b7f069415
commit 850dbb9453

View file

@ -309,7 +309,7 @@ class Mysql extends DboSource {
throw new CakeException(__d('cake_dev', 'Could not describe table for %s', $table));
}
foreach ($cols as $column) {
while ($column = $cols->fetch(PDO::FETCH_OBJ)) {
$fields[$column->Field] = array(
'type' => $this->column($column->Type),
'null' => ($column->Null === 'YES' ? true : false),