----- Original Message -----
From: "Jonathan Leffler" <[EMAIL PROTECTED]>
> Craig Sharp wrote:
>
> > I need to be able to determine if a value is not found within a database
and if so, report that the data and or row is not available back to the
browser.
>
> >
> > If the update statement cannot run due to the domain_name not existing
in the database I need to send an error back to the browser.
>
> You can find out how many rows were updated with $sth->rows, or with the
Informix-specific attributes such as $sth->{ix_sqlerrd}[1] -- check the
index number since I'm working from memory.
$sth->execute is supposed to return the number of rows affected in a
non-select
statement. If 0 rows are returned, the value is still true, so you must
explicitly
compare it to zero, e.g.:
my $rows = $sth->execute;
if ($rows == 0) { # NOT 'if ($rows)...'
# do stuff
}
HTH,
Douglas Wilson
-Doug