How to Print Last Executed Query in CakePhp?

How to Print Last Executed Query in CakePhp?

 

Here, ModelName is the Query from Model Name

$dbo = $this->ModelName->getDatasource();
$logs = $dbo->getLog();
$log = end($logs['log']);


echo "<pre>"; print_r($log); echo "</pre>"; 
exit();

 

# The Output will come like this….

 

Array
(
    [query] => SELECT * FROM .......
    [params] => Array
                (
                )

    [affected] => 0
    [numRows] => 0
    [took] => 3
)

 

Meta Tags for Search Engine Optimization

Meta Tags for Search Engine Optimization
# Meta Tags used for seo::
<meta name="description" content="Stackofcodes is a blog for Learners, Developers, designers. "/>

<meta name="robots" content="noimageindex,noarchive,nosnippet"/>

<link rel="canonical" href="//www.stackofcodes.in/" />




<meta property="og:locale" content="en_US" />

<meta property="og:type" content="article" />

<meta property="og:title" content="Pricing | Kissmetrics" />

<meta property="og:description" content="Get, keep and grow more customers with Kissmetrics Customer Engagement Automation platform. Built for eCommerce marketers and product teams." />




<meta property="og:url" content="https://www.stackofcodes.in/" />

<meta property="og:site_name" content="Kissmetrics" />

<meta property="og:image" content="" />

<meta property="og:image:secure_url" content="" />

<meta property="og:image" content="" />

<meta property="og:image:secure_url" content="" />




<meta name="twitter:card" content="summary" />

<meta name="twitter:description" content="Stackofcodes is a blog for Learners, Developers, designers." />

<meta name="twitter:title" content="Stackofcodes" />

<meta name="twitter:image" content="" />