Ver original$sql = "SELECT ..";$row = fetch_row($sql);if ($row['campo'] != 0) { $sql = "UPDATE.."; query($sql);}