Skip to content

Commit

Permalink
Making DboSybase able to return VIEW's as part of listSources(), maki…
Browse files Browse the repository at this point in the history
…ng it similar to DboPostgres and DboMysql. Fixes #91
  • Loading branch information
markstory committed Sep 16, 2009
1 parent f764c53 commit 2c63391
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cake/libs/model/datasources/dbo/dbo_sybase.php
Expand Up @@ -143,7 +143,7 @@ function listSources() {
return $cache;
}

$result = $this->_execute("select name from sysobjects where type='U'");
$result = $this->_execute("SELECT name FROM sysobjects WHERE type IN ('U', 'V')");
if (!$result) {
return array();
} else {
Expand Down Expand Up @@ -180,10 +180,11 @@ function describe(&$model) {
$column[0] = $column[$colKey[0]];
}
if (isset($column[0])) {
$fields[$column[0]['Field']] = array('type' => $this->column($column[0]['Type']),
'null' => $column[0]['Null'],
'length' => $this->length($column[0]['Type']),
);
$fields[$column[0]['Field']] = array(
'type' => $this->column($column[0]['Type']),
'null' => $column[0]['Null'],
'length' => $this->length($column[0]['Type']),
);
}
}

Expand Down

0 comments on commit 2c63391

Please sign in to comment.