Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (21 sloc) 0.773 kb
<?php
class sfPropelORMExplainActions extends sfActions
{
public function executeIndex(sfWebRequest $request)
{
$this->setLayout(false);
sfConfig::set('sf_web_debug', false);
// Open the connection
$con = \Propel::getConnection($request->getParameter('connection'));
// Get the adapter
$db = \Propel::getDB($request->getParameter('connection'));
try {
$this->query = base64_decode($request->getParameter('base64_query'));
$stmt = $db->doExplainPlan($con, $this->query);
$this->results = $stmt->fetchAll(\PDO::FETCH_ASSOC);
} catch (Exception $e) {
$this->getResponse()->setContent('<div class="error">This query cannot be explained.</div>');
return sfView::NONE;
}
}
}
Jump to Line
Something went wrong with that request. Please try again.