Category: Debugging

Q: How to check latest SQL logs in the controller?

Hi,

Is there a way to see latest SQL logs in CakePHP's controllers? I'd like to do this checking in my controller before rendering a view. 

Like: 

<?php echo $this->element('sql_dump'); ?>

In the controller instead of view. Thanks.

cakephp sql
1 Answers

Hi Sam:

I suppose you are using Cakephp 2.x. In Cake 3.x, debug kit is installed with Cakephp by default.

If you want to install Cake's debug kit manually on 2.x, you can get the package by following the instructions here:

 Github's CakePHP DebugKit

Cheers,

Created: 28 Aug '16

Last Reply: 30 Aug '16

Replies: 1

Views: 739

Votes: 0

Welcome to Aero Coding!

Aero Coding is a CakePHP-focused Q&A community for professional and enthusiast cake bakers. It's built and run by you as part of the community.


Join Now Tour

Download Cakephp

Start baking your own CakePHP application!


Cakephp All Versions