tested for a mysql secific error code. should only test for error. removed code check