jokkedk/ZFDebug — Issue #8: ZFDebug and calling stored procedures
Author: emeraldjava
Created: 2012-01-30 16:24:54+00:00
State: open

Hi,

I recently started using the ZFDebug tool and it's great. I have this action which calls a stored procedure to return a dataset. I've noticed that when ZFDebug is enabled and this action is called, the action is invoked multiple times and no reply is sent to the server. I appreciate my code might not be optimal but can you explain why ZFdebug might cause this to happen or how i should work around this issue?

public function matchingrunnersAction()
{
$this->logger->info('matchingrunnersAction()');
$eventtag = $this->_request->getParam('tag');
$eventTable = new Model_DbTable_Event();
$event = $eventTable->getEventByTag($eventtag);
$this->view->event = $event;

// call getMatchingRunnersByEvent();
$db = Zend_Db_Table::getDefaultAdapter();
$sql = sprintf("CALL getMatchingRunnersByEvent(%d)",$event->id);
$stmt = $db->prepare($sql);
$stmt->execute();

$this->view->matchingRunners = $stmt->fetchAll();
$stmt->closeCursor();

}

Regards,
Paul