i have a mysql table called 'data' and 2 columns called 'id' and 'name'
there are 100 records where 'id' = "orange"
what i want to do is write some php code that says:
where id="orange" change name to say "hello'"
any ideas greatly appreciated
amend mysql table column en masse
Moderator: General Moderators
Re: amend mysql table column en masse
You don't need any PHP code to do that; do it directly in MySQL.
Code: Select all
UPDATE `data` SET `name` = 'hello' WHERE `id` = 'orange'