RE: Truth and SQL

2001-07-18 Thread Steve Howard
Just a note on this. This does not work with all dbd's the version of DBD::ODBC I work with is one where it will not work. No matter how many rows are actually returned, $rows will always be -1 on this dbd. This is hinted at in perldoc DBI by the use of "if available" in the descriptions of this t

RE: Truth and SQL

2001-07-17 Thread Peter Hanson
First off, this assumes you are using DBI in your perl script. The line of code you want is this: my $rows = $sth->rows; This will run after the execute statement of a SQL query. $rows will contain how many rows were affected or it will return -1 if there was a problem (returned undef, error,