修正mysql驱动

This commit is contained in:
thinkphp
2016-02-01 11:10:36 +08:00
parent f6b2b3528e
commit 7f0cafca72

View File

@@ -125,7 +125,7 @@ class Mysql extends Driver
protected function getExplain($sql)
{
$pdo = $this->linkID->query("EXPLAIN " . $sql);
$result = $pdo->fetch(PDO::FETCH_ASSOC);
$result = $pdo->fetch(\PDO::FETCH_ASSOC);
$result = array_change_key_case($result);
if (strpos($result['extra'], 'filesort') || strpos($result['extra'], 'temporary')) {
Log::record('SQL:' . $this->queryStr . '[' . $result['extra'] . ']', 'warn');