mysql_num_rows equivalent for DBI?

B

Ben Giddings

Is there a database-independent way of finding out how many rows were
returned by a given query using Ruby DBI? Every method I've looked at that
seems like a candidate has not yielded a reasonable result. I suppose I
could do fetch_all.size, but that seems wasteful.

In case it matters I'm using PostgreSQL as the database.

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
474,137
Messages
2,570,797
Members
47,342
Latest member
eixataze

Latest Threads

Top