改进数据库驱动的getFields方法 支持指定别名的情况 修正model类一处错误

This commit is contained in:
ThinkPHP
2013-04-30 10:45:38 +08:00
parent 7cfdde0ab7
commit 64f7e1d3ca
7 changed files with 8 additions and 3 deletions

View File

@@ -34,6 +34,7 @@ class Sqlite extends Driver {
* @return array
*/
public function getFields($tableName) {
list($tableName) = explode(' ', $tableName);
$result = $this->query('PRAGMA table_info( '.$tableName.' )');
$info = [];
if($result){