![]() |
SQL query to find/repalce post text in a specific forum
Hello,
I am trying use a sql query to find and replace a certain word in a specific forum. I tried the following but that did not work. Code:
UPDATE post SET pagetext = REPLACE(pagetext, 'oldtext', 'newtext') WHERE forumid='435' An error occurred while attempting to execute your query. The following information was returned. error number: 1054 error desc: Unknown column 'forumid' in 'where clause' Any help is appreciated. Thank you. |
Well, as the error says, there is no forumid column in the post table. You would need to join with the thread table (post.threadid = thread.threadid) in order to get the forumid (thread.forumid).
|
Quote:
Code:
UPDATE post |
Quote:
That worked like a charm! Thanks a lot. Some questions: 1. What if I want to replace multiple words? 2. For multiple Child forums, is it possible to select a parent forum? This will cut down a lot of time for me. Thanks again. |
Code:
UPDATE post |
All times are GMT. The time now is 03:35 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|