数组定义规范统一

This commit is contained in:
thinkphp
2013-04-01 11:03:19 +08:00
parent 668aca97c8
commit 6f5db51323
33 changed files with 87 additions and 87 deletions

View File

@@ -26,7 +26,7 @@ class Mysql extends Driver{
$this->initConnect(true);
$sql = 'SHOW COLUMNS FROM `'.$tableName.'`';
$result = $this->query($sql);
$info = array();
$info = [];
if($result) {
foreach ($result as $key => $val) {
$info[$val['Field']] = array(
@@ -49,7 +49,7 @@ class Mysql extends Driver{
public function getTables($dbName='') {
$sql = !empty($dbName)?'SHOW TABLES FROM '.$dbName:'SHOW TABLES ';
$result = $this->query($sql);
$info = array();
$info = [];
foreach ($result as $key => $val) {
$info[$key] = current($val);
}