diff --git a/README.md b/README.md index 2c97c9d..4823385 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,7 @@ composer install pecee/pixie - [**Delete**](#delete) - [Transactions](#transactions) - [Get Built Query](#get-built-query) + - [Get QueryObject from last executed query](#get-queryobject-from-last-executed-query) - [Sub Queries and Nested Queries](#sub-queries-and-nested-queries) - [Get PDO Instance](#get-pdo-instance) - [Fetch results as objects of specified class](#fetch-results-as-objects-of-specified-class) @@ -783,6 +784,16 @@ Calling the `getRawSql()` method will return a query including bindings like thi SELECT * FROM my_table where `id` = 3 ``` +#### Get QueryObject from last executed query + +You can also retrieve the query-object from the last executed query. + +**Example:** + +```php +$queryString = $qb->getLastQuery()->getRawSql(); +``` + ### Sub Queries and Nested Queries Rarely but you may need to do sub queries or nested queries. Pixie is powerful enough to do this for you. You can create different query objects and use the `$queryBuilder->subQuery()` method.