Add Last Query Retrieval

Need a way to get the last query that was executed, as it was executed.
Merge pull request #1 from wilsonodk/get-last-query

Add Last Query Retrieval