how can I debug a query that it what its going to run,
like
$this->Article->find('all',array开发者_Go百科('id'=>123)); is probably running something like
select * from articles where article.id = 123; but how can I be sure and can see that in a debug or something.
thanks
Set app/core/config.php debug = 2
http://book.cakephp.org/view/924/The-Configuration-Class#CakePHP-Core-Configuration-Variables-931
@Ken's answer is correct, but I would recommend you downloading the debug_kit plugin; as it provides far more information than the standard output.
You will need to enable debug, as stated in the other answer; but the plugin adds a whole host of extras such as logging, performance, full SQL queries, history, variable dumps etc - definitely makes things easier for testing and general debugging.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论