Query类增加getlastsql方法

This commit is contained in:
thinkphp
2016-05-20 14:47:20 +08:00
parent 82eb899990
commit 92496f65a1
2 changed files with 11 additions and 1 deletions

View File

@@ -178,6 +178,16 @@ class Query
return $this->connection->getLastInsID();
}
/**
* 获取最近一次查询的sql语句
* @access public
* @return string
*/
public function getLastSql()
{
return $this->connection->queryStr;
}
/**
* 执行数据库事务
* @access public