Not that I know of, sorry mate. I usually make it on my own. Simply make a class (if you know how, you're already on your way). In the class (it's a mySQL class btw), you are going to create a function called query. When the $mysql->query(); is called upon, you can insert the query into an array like so; $history = array("sql" => $query);
In any case, something like that. The same you can perform with any given object or item. Fetched, Result or what ever you prefer.