* finish task #2418.

This commit is contained in:
wangyidong
2015-11-24 12:07:39 +08:00
parent 715050df57
commit 2aba28b253

View File

@@ -428,6 +428,20 @@ class dao
echo $this->processSQL();
}
/**
* Explain sql.
*
* @param string $sql
* @access public
* @return void
*/
public function explain($sql = '')
{
$sql = empty($sql) ? $this->processSQL() : $sql;
$result = $this->dbh->query('explain ' . $sql)->fetch();
a($result);
}
/**
* Process the sql, replace the table, fields.
*