Sure, you can run an SQL query on your database (be sure to make a backup first). I’m thinking of something like this:
UPDATE exp_channel_titles AS t SET t.status = 'closed'
WHERE t.status = 'open' AND t.author_id = "99"
You’ll need to adjust the author_id, of course.
ETA: Changing the expiration date can be done in a similar manner, using expiration_date
.
Sure, you can run an SQL query on your database (be sure to make a backup first). I’m thinking of something like this:You’ll need to adjust the author_id, of course. ETA: Changing the expiration date that can be done in a similar manner, using `expiration_date`.UPDATE exp_channel_titles AS t SET t.status = 'closed' WHERE t.status = 'open' AND t.author_id = "99"
What database would I work with? I would guess exp_weblog_data.MYD? Is there a sql query I could run to see what posts would be affected? Would t.author.id equal the friendly username like “The Conman” or would I need something else? I guess if something doesn’t work correctly I could always change the t.status = ‘closed’ to ‘open’ should it not work right.
By no means do I have any experience here and do not want to hose the database and/or site! So, the more steps the better for me.
Thanks again.
In fact - would I use the ‘mysql’ tool on the Linux box? Again, the more steps the better in this case for me. Also, I did look thru the documentation and forums here trying to find a gem that would have led me to a solution. Was anything like what I’m asking documented anywhere?
Again, thank you in advance.
What database would I work with? I would guess exp_weblog_data.MYD?
There is only one EE database, and you should never touch your db on a file system level under ordinary circumstances. exp_weblog_data
is a table of that db, but not the one to use: my example used exp_channel_titles
. (You seem to be on a very old version of EE, by he way. weblogs
were renamed to channels
in 2009, if memory serves.)
Would t.author.id equal the friendly username like “The Conman” or would I need something else?
The user_id would be numeric, like the ‘99’ in my example.
In fact - would I use the ‘mysql’ tool on the Linux box?
No. If you don’t want to use an external tool like phpMyAdmin, you can use the query form of the built-in SQL Manager. That said, you really should have an idea of what you are doing. In your case it might be a good idea to get help from somebody familiar with SQL.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.