Query table in views
Hi. I'm learning CakePHP (using the blog app tutorial) and I want to get rid of that stupid table of SQL queries that shows in my views. So far I only found out that the table isn't passed in $content_for_layout variable, because it appends after the </html> tag. Thanks for any answers.
Asked by JakubLedl, on 14/11/09
2 Answers
Others may have this question so it deserves an answer.
The core configuration setting debug changes CakePHP debugging output.
0 = Production mode. No output.
1 = Show errors and warnings.
2 = Show errors, warnings, and SQL.
3 = Show errors, warnings, SQL, and complete controller dump.
This is normally set in APP/config/core.php.
Answered by NetersLandreauon 14/11/09
When developing it might be handy to enable debugging in only one controller.
Then you can always put:
Configure::write('debug', 2) in that controller. That will show the debug info again.
Same goes for the other way around.
Say you're returning xml in one view, the debug info will cause invalid xml. Putting 'Configure::write("debug", 0)' in the controller will turn in off for that action. While other controllers where it is not set will take the setting in the core.php file.
Use the beforefilter method if you want to change the setting for the entire controller(all actions).
Answered by Crazyon 15/11/09
Tagged with
Rating
3
Viewed
2249 times
Last Activity
on 15/11/09
Don't bother, question resolved.
JakubLedl - on 14/11/09