protected function runQuery($raw_query, $id)
    {
        $query = str_replace(':id', $id, $raw_query);

        $start = microtime(true);

        // Does not work as a prepared statement; we have to execute it directly
        $results = DB::getReadPdo()->query($query)->fetchAll(\PDO::FETCH_OBJ);

        // Log the query manually
        DB::logQuery($raw_query, [$id], round((microtime(true) - $start) * 1000, 2));

        return $results;
    }
protected function runQuery($raw_query, $id)
    {
        $query = str_replace(':id', $id, $raw_query);

        $start = microtime(true);

        // Does not work as a prepared statement; we have to execute it directly
        $results = DB::getReadPdo()->query($query)->fetchAll(\PDO::FETCH_OBJ);

        // Log the query manually
        DB::logQuery($raw_query, [$id], round((microtime(true) - $start) * 1000, 2));

        return $results;
    }
protected function runQuery ( $ raw_query , $ id ) { $ query = str_replace ( ':id' , $ id , $ raw_query ) ; $ start = microtime ( true ) ; // Does not work as a prepared statement; we have to execute it directly $ results = DB :: getReadPdo ( ) -> query ( $ query ) -> fetchAll ( \ PDO :: FETCH_OBJ ) ; // Log the query manually DB :: logQuery ( $ raw_query , [ $ id ] , round ( ( microtime ( true ) - $ start ) * 1000 , 2 ) ) ; return $ results ; }
Execute the query with the current PDO connection.
Will log the time taken manually

@param string $raw_query
@param int $id
@return \Illuminate\Support\Collection
Execute the query with the current PDO connection . Will log the time taken manually