# Mysql DBD and DBI -- affected\_rows

**URL:** <https://www.ruby-forum.com/t/mysql-dbd-and-dbi-affected-rows/114113>\
**Category:** Ruby\
**Created:** [September 8, 2007, 1:33am UTC](https://www.ruby-forum.com/t/mysql-dbd-and-dbi-affected-rows/114113 "2007-09-08T01:33:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![venkatp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/9fc29f/32.png) [@venkatp](https://www.ruby-forum.com/u/venkatp)\
**Post date:** [September 8, 2007, 1:33am UTC](https://www.ruby-forum.com/t/mysql-dbd-and-dbi-affected-rows/114113/1 "2007-09-08T01:33:12Z")

</div>

I posted this on c.l.ruby a few hours back, but don’t see it here. I  
registered and and posting here. So, bear with me if this has been  
discussed before. I have been writing a few classes in ruby based on DBI  
(version 0.1.0). I have only used Mysql driver so far. I have a few  
questions related to DBI.

1. The DBI StatementHandle class seems to be encapsulating a cursor. Or  
is  
it just me? For example, there is no way to repeatedly use a  
StatementHandle  
object with different SQL statements.

2. There is no way to get affected\_rows on a queries (e.g. update,  
delete,  
etc.) that don’t return results. There is a affected\_rows on  
DatabaseHandle  
but not on StatementHandle.

3. There is a StatementHandle#fetch\_array method, but no  
StatementHandle#bind\_array method. bind\_array method would be useful  
when  
inserting/updating more than one row at a time.

These are really not questions, but I am just trying to find out if I  
missed  
something.

-Venkat
