In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Michael Peppler) wrote:
> > my $rows = $sth->rows; > > # only expecting one row for a unique ID . this should NEVER happen. > > safe_error("invalid number of rows returned from database ($rows) for > > ID $id") > > if $rows > 1; > > # although this might... > > safe_error("no match in database for ID $id") > > if $rows < 1; > > Be careful here! > > Most DBI drivers will return -1 for $sth->rows() for a SELECT query. =:o > In the case of DBD::Sybase $h->rows() will return the correct number > of rows only *after* all the rows have been fetched. I guess I'm fortunate that DBD::'s CSV, AnyData, and mysql all work this way. -- Scott R. Godin | e-mail : [EMAIL PROTECTED] Laughing Dragon Services | web : http://www.webdragon.net/