Add last_query() helper method to Database class, too.

Signed-off-by: Franz Liedke <franz@develophp.org>
This commit is contained in:
Franz Liedke 2012-05-30 18:44:48 +03:00
parent 98b9898003
commit b4f07d43f5
1 changed files with 12 additions and 0 deletions

View File

@ -134,6 +134,18 @@ public static function profile()
return Database\Connection::$queries; return Database\Connection::$queries;
} }
/**
* Get the last query that was executed.
*
* Returns false if no queries have been executed yet.
*
* @return string
*/
public static function last_query()
{
return Database\Connection::last_query();
}
/** /**
* Register a database connector and grammars. * Register a database connector and grammars.
* *