Skip to content

Commit

Permalink
解决有些数据库表名可能使用mysql关键字造成程序运行错误的问题,感谢@snowdiva指出
Browse files Browse the repository at this point in the history
  • Loading branch information
jormin authored Sep 21, 2017
1 parent 8be331b commit 7918145
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controllers/DDocController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private function initTablesData()
$tables = DB::select('SHOW TABLE STATUS ');
foreach ($tables as $key => $table) {
//获取改表的所有字段信息
$columns = DB::select("SHOW FULL FIELDS FROM ".$table->Name);
$columns = DB::select("SHOW FULL FIELDS FROM `".$table->Name."`");
$table->columns = $columns;
$tables[$key] = $table;
}
Expand Down

0 comments on commit 7918145

Please sign in to comment.