_execute example


    public function execute(...$data)
    {
        // Execute the Query.         $startTime = microtime(true);

        try {
            $exception = null;
            $result    = $this->_execute($data);
        } catch (ArgumentCountError|ErrorException $exception) {
            $result = false;
        }

        // Update our query object         $query = clone $this->query;
        $query->setBinds($data);

        if ($result === false) {
            $query->setDuration($startTime$startTime);

            

    public function execute(array $params = null)
    {
        /* * Simple case - no query profiler to manage. */
        if ($this->_queryId === null) {
            return $this->_execute($params);
        }

        /* * Do the same thing, but with query profiler * management before and after the execute. */
        $prof = $this->_adapter->getProfiler();
        $qp = $prof->getQueryProfile($this->_queryId);
        if ($qp->hasEnded()) {
            $this->_queryId = $prof->queryClone($qp);
            $qp = $prof->getQueryProfile($this->_queryId);
        }
Home | Imprint | This part of the site doesn't use cookies.