Skip to content

ZFDebug and calling stored procedures #8

@emeraldjava

Description

@emeraldjava

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions