Sorry, I changed the sample.
UPDATE `login` SET `groupd_id`=99 , `sex`='F' WHERE `level`> '50'
Could be
updsql(login,group_id(99),sex("F"),WHERE(level>50));
--
SELECT userid FROM login WHERE account_id = "+getcharid(3)
could be
setsql(login,userid,WHERE(account_id==getcharid(3)));
so:
set @userid,setsql(login,userid,WHERE(account_id==getcharid(3)));
mes "Your user id is "+@userid+"!";
close;
--