robinantill
Technical User
Hi,
I have a mysql database and I want to reset the values of one of the numerical fields to another numerical value.
By using the following I can change the value of all of the fields which are '1' to '33' but what I want is not to put a value in for the existing values in the field but have all fields selected and replaced with '33' or whatever i.e. the second example:-
UPDATE phpbb_banlist SET ban_userid = replace(ban_userid,"1","33");
UPDATE phpbb_banlist SET ban_userid = replace(ban_userid,"*","33");
I.E. what do I need to do to replace all the values in the field to a set value.
Thanks,
Robin Antill
I have a mysql database and I want to reset the values of one of the numerical fields to another numerical value.
By using the following I can change the value of all of the fields which are '1' to '33' but what I want is not to put a value in for the existing values in the field but have all fields selected and replaced with '33' or whatever i.e. the second example:-
UPDATE phpbb_banlist SET ban_userid = replace(ban_userid,"1","33");
UPDATE phpbb_banlist SET ban_userid = replace(ban_userid,"*","33");
I.E. what do I need to do to replace all the values in the field to a set value.
Thanks,
Robin Antill