I'm having a bit of brain fade on this one...
I'm working on an area of a program that does something like this
$query = SELECT Keyword FROM Boards
$sth = $dbh -> prepare ($query) or main::not_right("Query syntax error:
$DBI::errstr. Query: $query");
$sth -> execute() or main::not_right("Can't execute query: $query.
Reason: $DBI::errstr");
What I want to do is if the prepare or execute query fails, instead of the
above lines, I want to do something like this:
$sth = $dbh -> prepare ($query) or ...
print "Line $counter: Query syntax error: $DBI::errstr. Query: $query: Not
imported.<br>\n";
$counter++;
$err_cnt++;
next;
But I don't know how to get all these actions into the failure function.
Can anyone lend a hand...
Jerry