snipt

Ctrl+h for KB shortcuts

PHP

Cakephp last query log

$log = $this->Model->getDataSource()->getLog(false, false);
debug($log);
https://snipt.net/embed/00dba0417ae40571acd7d7c4c527397a/
/raw/00dba0417ae40571acd7d7c4c527397a/
00dba0417ae40571acd7d7c4c527397a
php
PHP
2
2019-07-22T11:28:47
True
False
False
/api/public/snipt/96592/
cakephp-last-query-log
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="x">$log = $this-&gt;Model-&gt;getDataSource()-&gt;getLog(false, false);</span> </span><span id="L-2"><a name="L-2"></a><span class="x">debug($log);</span> </span></pre></div> </td></tr></table>
Cakephp, last_query, query, query_log