Print CakePHP Query

We may always want to know what query that's excuted when we use find('all'), find('list') or save() in CakePHP.
If I want know what is last excuted CakePHP query when we used CakePHP model find('all'). Use the following CakePHP script.