On Feb 18, 2011, at 06:10, Djonatan Buss wrote:

> HI everyone, I'm just starting with cake and that's my first post in this 
> forum.

Welcome!

> I have been having the help of a friend that works with a cake but I couldn't 
> find the right way to see the SQL generated by cake.
> 
> In order to learn it better and understand how it makes SQL and why theres 
> some troubles sometimes.
> 
> So I would like to know how do I check every INSERT, UPDATE and SELECTs that 
> cake does.
> which method do I have to use, where it should be placed and thing like that
> 
> I'm using the cake default layout in order to check the SELECTS but I would 
> like to see the other as well... 

The default CakePHP SQL debugging will only show you the queries that happened 
on this request. I too wanted to be able to see queries that happened on other 
previous related requests -- for example, if you submit a form that adds, 
edits, updates or deletes, then it will do those things, and then redirect to 
another page which then displays the new data; CakePHP's default only shows the 
queries to select the new data and not the queries to actually change the data.

One solution is to use the debugkit:

https://github.com/cakephp/debug_kit#readme

It adds a toolbar to your page where you can view the queries for each 
individual page. It also has other features that may be interesting to you.


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to