K
K
keslo2015-01-13 16:34:39
PHP
keslo, 2015-01-13 16:34:39

How to create a query to MySQL?

Good afternoon.
On the site on CMS MODx in the MySQL table there is a table - modx_site_content . This table has a column called cacheable . This column is set to either 1 or 0, depending on whether the page is cacheable or not.
I need to make a query to the database to set the value of 0 in all columns for all rows. Now all pages have the value 1. There are about 700 pages on the site, so I don’t really want to do it manually.
How to form a MySQL query to change the data of an entire column?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeniy Samoilenko, 2015-01-13
@keslo

Just go to PMA(PhpMyAdmin) most likely you have it as a subd on the server. open this table and make a query (click on the "SQL" tab), which was suggested above:

update modx_site_content set cacheable = value where cacheable = 0

M
Melkij, 2015-01-13
@melkij

The simplest update without a condition, the question is what?

A
Alexey Yakhnenko, 2015-01-13
@ayahnenko

update table set column = value where 1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question