From: Ben Giddings Date: 2003-10-12T05:17:19+09:00 Subject: Re: mysql_num_rows equivalent for DBI? paul vudmaska wrote: > What i think you are looking for is recordset#rows - > Returns the RPC (Row Processed Count) of the last > executed statement, or nil if no such exists. That's what I thought I should be using, but it is always zero: irb(main):097:0> dbh.execute("SELECT Username FROM Users").fetch_all [["ben"], ["harry"]] irb(main):098:0> dbh.execute("SELECT Username FROM Users").rows 0 irb(main):099:0> sth = dbh.prepare("SELECT Username FROM Users") ... irb(main):100:0> sth.execute [nil] irb(main):101:0> sth.rows 0 irb(main):102:0> sth.fetch_all [["ben"], ["harry"]] This appears to be a bug, doesn't it? Ben