Commit 98b98980 authored by Franz Liedke's avatar Franz Liedke

Add a last_query() function to Database connection class.

parent bc67c667
......@@ -322,5 +322,17 @@ class Connection {
{
return $this->table($method);
}
/**
* Get the last query that was executed.
*
* Returns false if no queries have been executed yet.
*
* @return string
*/
public static function last_query()
{
return end(static::$queries);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment