in reply to Perl/SQL Query
You can later in your code check if there where any errors by sayingdie $db_handle->errstr; my $sth = $dbh->prepare('SELECT * FROM table WHERE column LIKE ("%"?"% +") LIMIT 1') or $error = "$db_handle->errstr"); my $rv = $sth -> execute($column_value);
Sometimes you dont have any errors, but your query resulted in zero rows!! You can check the number of rows affected by the $rv.if ($error) {do something}
Best Wishes
Cav
update (broquaint): tided up formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl/SQL Query
by runrig (Abbot) on Sep 20, 2003 at 23:38 UTC |