exactly, you need another field (like userid) to only update the one you changed (and not all of them).
$DB_site->query("UPDATE user SET stock = '$wholething' WHERE userid = $stock[userid]");
you'll also have to fetch the userid first, making it all together:
PHP Code:
$upstck = $DB_site->query("SELECT userid,stock FROM user");
while($stock = $DB_site->fetch_array($upstck))
{
$firstpart = substr($stock[stock],0,2);
$lastpart = substr($stock[stock],4);
$wholething = $firstpart . "00" . $lastpart;
$DB_site->query("UPDATE user SET stock = '$wholething' WHERE userid = $stock[userid]");
}