I am trying to process inside a loop a large amount of insert statements. This is not difficult, but if one of them fails due to a data problem causing a syntax error, the entire script stops executing. I dont want that, I want to log the bad statement and continue execution....
something like a try-catch block. This is what I am doing now....
Code: Select all
odbc_exec ( $db, $sqlstm) or die ("ERROR MESSAGE OR LOGGING FUNCTION")