query(" UPDATE reportsv2 SET Status = 'New' WHERE ID = ".$_GET['id']." AND Status != 'Resolved'"); if ($DB->affected_rows() > 0) { //Win } else { echo 'You just tried to grab a resolved or nonexistent report!'; } ?>