Actually there's more here than just the query you ought to look at.
- if ($view == pvp)
What's pvp? $pvp surely? (even if it's an integer)
- if ($stat[pvp] = N)
That should be ==, not just a single equals sign. That's for variable assigning, not comparison.
- mysql_query("$sql")
You don't need the quote marks. Although they won't break it, you shouldn't have them.
Use echo instead of print.
$sql = "UPDATE players SET pvp = N WHERE id = '".$stat[id]."'";
N needs to be quoted and also you can do it like this:
$sql = "UPDATE players SET pvp='N' WHERE id={$stat[id]}";
Hope that gets you started.
Cheers,
Rich