src/CentralApps/Pagination/PdoTrait.php
protected function convertToCountQuery($sql)
    {
        try {
            $this->checkForMainOffsetOrLimit($sql);
        } catch (\Exception $e) {
            throw $e;
        }

        return "SELECT
                    COUNT(*) as pagination_count
                " . $this->stripQueryToUnnestedKeyword($sql) . "
                LIMIT
                    1";
    }
protected function convertToCountQuery($sql)
    {
        try {
            $this->checkForMainOffsetOrLimit($sql);
        } catch (\Exception $e) {
            throw $e;
        }

        return "SELECT
                    COUNT(*) as pagination_count
                " . $this->stripQueryToUnnestedKeyword($sql) . "
                LIMIT
                    1";
    }
protected function convertToCountQuery ( $ sql ) { try { $ this -> checkForMainOffsetOrLimit ( $ sql ) ; } catch ( \ Exception $ e ) { throw $ e ; } return "SELECT
                    COUNT(*) as pagination_count
                " . $ this -> stripQueryToUnnestedKeyword ( $ sql ) . "
                LIMIT
                    1" ; }
Convert the query to a single row count
@param string $sql
@param return query
Convert the query to a single row count