This will not do what you're expecting; to find out if anything was deleted you'd need to check how many rows were affected by the query. This as is would only fail if there is an error in the query itself.