I'm sorry for this but I am a beginner. I'll try to explain:

I have a class that uses the DBAL doctrine, this class I have a method that
has the function to return the number of lines of a "resultset". as I said,
it works with mysql and postgress but failed when I tried to use with
sqlserver.

in fact need to know if there is a way to recover the number of lines of a
"resultset" portably.

my function:

public function nLinhas($resultSet)
    {
        if (!\is_object($resultSet)) {
            throw new \Exception($this->getExcecao(2));
        }

        return (int) $resultSet->rowCount();
    }



2015-01-06 9:40 GMT-03:00 Nima Sadjadi <[email protected]>:

> I don't know what exactly you want to do, can't you just use "count" in
> your dql, with getSingleScalarResult instead of getResult?
>
> --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Pablo Vanni

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to