Changed call after database delete to 'SELECT ROW_COUNT()' to extract the number of records deleted.