No, you removed the WHERE part, so now the query will be executed on every row, not a good thing.
unction onUse() {
global $smcFunc;
$result = $smcFunc['db_query']('', '
UPDATE {$db_prefix}members
SET shop_Flag = {string:flag}
WHERE id_member = {int:id_member}
array(
'id_member' => $message['member']['id'],
'flag' => $_POST['flag']
)
}
This will only modify the flag column in the member's specific row. Take the old 1.1.x query as an example, the only thing you need to change is how you will perform the query but the query itself is still the same.