src/Database/DatabaseBase.php
public final function query($strQuery)
    {
        $timerName = null;
        if (!$this->blnConnectedFlag) {
            $this->connect();
        }


        if ($this->blnEnableProfiling) {
            $timerName = 'queryExec' . mt_rand();
            Timer::start($timerName);
        }

        $result = $this->executeQuery($strQuery);

        if ($this->blnEnableProfiling) {
            $dblQueryTime = Timer::stop($timerName);
            Timer::reset($timerName);

            // Log Query (for Profiling, if applicable)
            $this->logQuery($strQuery, $dblQueryTime);
        }

        return $result;
    }
public final function query($strQuery)
    {
        $timerName = null;
        if (!$this->blnConnectedFlag) {
            $this->connect();
        }


        if ($this->blnEnableProfiling) {
            $timerName = 'queryExec' . mt_rand();
            Timer::start($timerName);
        }

        $result = $this->executeQuery($strQuery);

        if ($this->blnEnableProfiling) {
            $dblQueryTime = Timer::stop($timerName);
            Timer::reset($timerName);

            // Log Query (for Profiling, if applicable)
            $this->logQuery($strQuery, $dblQueryTime);
        }

        return $result;
    }
public final function query ( $ strQuery ) { $ timerName = null ; if ( ! $ this -> blnConnectedFlag ) { $ this -> connect ( ) ; } if ( $ this -> blnEnableProfiling ) { $ timerName = 'queryExec' . mt_rand ( ) ; Timer :: start ( $ timerName ) ; } $ result = $ this -> executeQuery ( $ strQuery ) ; if ( $ this -> blnEnableProfiling ) { $ dblQueryTime = Timer :: stop ( $ timerName ) ; Timer :: reset ( $ timerName ) ; // Log Query (for Profiling, if applicable) $ this -> logQuery ( $ strQuery , $ dblQueryTime ) ; } return $ result ; }
Sends the 'SELECT' query to the database and returns the result

@param string $strQuery query string

@return ResultBase
Sends the SELECT query to the database and returns the result