Add a last_query() function to Database connection class.
This commit is contained in:
parent
bc67c667a9
commit
98b9898003
|
@ -323,4 +323,16 @@ public function __call($method, $parameters)
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue