Help doing a global replace

Discussion in 'Databases' started by zeromaster, Dec 23, 2009.

  1. #1
    I need to modify perm_value , perm_negated and perm skip across all of the entries im perms_server_group that match perm_id 'b_virtualserver_modify_hostbanner' to all be 0, 0 ,0
    Can someone help me out

    REPLACE INTO `perm_server_group` (`server_id`, `id1`, `id2`, `perm_id`, `perm_value`, `perm_negated`, `perm_skip`) VALUES
    (3, 13, 0, '[B]b_virtualserver_modify_hostbanner[/B]', [B]0, 0, 0[/B]),
    
    Code (markup):

     
    zeromaster, Dec 23, 2009 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    UPDATE `perm_server_group`
    SET `perm_value` = 0, `perm_negated` = 0, `perm_skip`= 0
    WHERE `perm_id` = 'b_virtualserver_modify_hostbanner';

    If I'm understanding correctly this should do what you are looking to do. Make sure to backup the table before performing table wide updates like this.
     
    jestep, Dec 24, 2009 IP