Skip to content

Commit

Permalink
fixed 获取表结构方法需转义表名
Browse files Browse the repository at this point in the history
  • Loading branch information
cmpan committed May 20, 2017
1 parent 1a58a38 commit c086a80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name" : "windwork/db",
"description" : "windwork db component.Windwork MySQL数据库访问组件",
"version" : "0.3.2",
"version" : "0.3.3",
"require" : {
"php" : ">=5.5.0"
},
Expand Down
2 changes: 1 addition & 1 deletion lib/ADB.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function getTableSchema($table)
static $tableSchemaList = array();

if((!$tableSchemaList || empty($tableSchemaList[$table]))) {
$rows = $this->getAll("SHOW COLUMNS FROM {$table}");
$rows = $this->getAll("SHOW COLUMNS FROM %t", [$table]);
$tableSchema = array(
'pk' => '',
'ai' => false,
Expand Down

0 comments on commit c086a80

Please sign in to comment.