S
S
SOTVM2020-02-28 04:50:00
MySQL
SOTVM, 2020-02-28 04:50:00

What to make a query to the database?

I need to overwrite the column value `page_id_autor` = '1'
in all existing rows `page_id` = 3546

screen
5e58766764d25858748736.png

Here is the query I get when I change one cell by hand
UPDATE `forumdb`.`mso_page` SET `page_id_autor` = '1' WHERE `mso_page`.`page_id` = 3546;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AUser0, 2020-02-28
@sotvm

Apparently, you have only one record in your table with a unique page_id=3546.
If there were more records in the table with the same page_id, they would also change from such a request.
PS If you need to change all entries where page_id_author is equal to 3 or 6, then:

UPDATE `forumdb`.`mso_page` SET `mso_page`.`page_id_autor` ='1' WHERE `mso_page`.`page_id_author` IN ('3', '6')

And if you change in general ALL records in the table, then:
UPDATE `forumdb`.`mso_page` SET `mso_page`.`page_id_autor`='1'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question