The Arcive of vBulletin Modifications Site. |
|
|
[vB3/vB4] VERY general SQL query via AdminCP to change usernames in quotes.
You gave someone a username change. Great, but his old username is still in all places where he was quoted in the past. Run this query in AdminCP, replacing with actual usernames HTML Code:
UPDATE post SET pagetext = REPLACE(pagetext, '=old name', '=new name') BUT: if there exists a apostrophe in the old username, the DB will think that's the end of the string and will kick a syntax error. Therefore where apostrophe exists in either username, double it, as such: '' Example: HTML Code:
UPDATE post SET pagetext = REPLACE(pagetext, '=Sammy''s', '=Elliot') You're welcome.
|
|
#2
|
||||
|
||||
|
Not tested, but try these ;-D
PHP Code:
PHP Code:
|
|
#3
|
||||
|
||||
|
Quote:
|
|
#4
|
||||
|
||||
|
Oh wait, I thought you need help, but this is a how-to ;-))
|
| Благодарность от: | ||
| Max Taxable | ||
|
#5
|
||||
|
||||
|
Yep I had used this query before and never had problems. When it kicked the syntax error this morning, it took me a bit to figure out why.
So, just thought I would share in case anyone else wants to globally change quoted usernames, and needs a query to do it. I smell a Hack coming here, one that does this automatically any time you change a username? |
|
#6
|
||||
|
||||
|
Would you happen to know what query to run to change username in other areas that do not change when a new name is applied?
--------------- Added [DATE]1405906738[/DATE] at [TIME]1405906738[/TIME] --------------- Never mind, I went into the database and changed the names that needed changed in the areas that did not change the users name. |
|
#7
|
||||
|
||||
|
What areas are those, just out of curiosity. PMs quoted? Can add what you've figured out, to the article.
|
|
#8
|
||||
|
||||
|
ibProArcade v2.7.2+
|
| Благодарность от: | ||
| Max Taxable | ||
|
#9
|
||||
|
||||
|
I wonder if that is true also for v3 Arcade.
|
![]() |
|
|