Asim Zaidi
Asim Zaidi

Reputation: 28344

what actually is ran through the query

how can I debug a query that it what its going to run, like $this->Article->find('all',array('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

Upvotes: 0

Views: 53

Answers (2)

Ross
Ross

Reputation: 17987

@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.

Upvotes: 0

Related Questions