public function pdoQuery(PDOStatement $pStmt, $pReturnResults = true)
    {
        $returnValue = null;

        try {
            // Call the database routine
            $returnValue = $pStmt->execute();

            if ($returnValue && $pReturnResults) {
                // Fetch all rows into an array.
                $rows = $pStmt->fetchAll(PDO::FETCH_ASSOC);

                if ($this->isArray($rows)) {
                    $returnValue = $rows;
                }
            }

            $pStmt->closeCursor();
        } catch (Exception $pError) {
            throw new Exception('A PDO Error has occurred: ' . $pError->getMessage());
        }

        return $returnValue;
    }