Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 1882

phpBB Custom Coding • Re: changing post content over all sub-forum

$
0
0
First of all : Whatever you do on/to the database: make sure you have a backup so that you can revert any changes made.

And in order to avoid having to restore if/when something goes wrong, I'ld test any action on a copy of the table first , actually better even a copy of the board so that you can see the result on a working board. (at no risk to your live board).

It's actually quite simple to replace "a text" with "another text" using SQL.

Code:

UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'old_text', 'new_text');
However: the post_text may not be the only field containing "outdated" chapter numbers. The post_title could also contain chapter X, perhaps even the topic_title.

The first action needed is to clearly identify the strings you want to change. Is it always "chapter" or sometimes "Chapter"?

Added: Excellent point by the coalman about the numbering: not Chapter 2 but Chapter 2

Statistics: Posted by warmweer — Mon Aug 19, 2024 7:10 pm



Viewing all articles
Browse latest Browse all 1882

Trending Articles