Reputation: 165
I have phpmyadmin page and I must alter many rows in my database. I have table 'lime_answers', and inside I have answer and language columns. What I want to do is to update all answers that are, lets say "littlepony" to "bigpony", but only when language column has "en" in that row. So something like
SELECT * FROM 'lime_answers' WHERE ('answer' = 'littlepony' AND 'language' = 'en')
then SET 'answer' = 'bigpony'
Is this possible?
Upvotes: 0
Views: 36
Reputation: 685
UPDATE lime_answers SET `answer` = 'bigpony' WHERE (`answer` = 'littlepony' AND `language` = 'en')
Use this
Upvotes: 1
Reputation: 21
Try this
update 'lime_answers' set 'answer' = 'bigpony'
where ('answer' = 'littlepony' AND 'language' = 'en')
Upvotes: 2
Reputation: 827
Try to use
update lime_answers set answer = 'bigpony' where answer = 'littlepony' AND language = 'en'
Upvotes: 1