The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Replacing substring in database field
Hi,
I need to change a value in one of my fields so that the string "%20" would be replaced by a space, " ". Eg. in the field the value "United%20States" would change to "United States", how do I achieve this? Thanks in advance, G |
#2
|
||||
|
||||
[sql]
UPDATE table SET fieldname = REPLACE(fieldname, '%20', ' ') [/sql] |
#3
|
|||
|
|||
Just for references it seems that you inserted a string that was urlencode, so to prevent this in the future you could always urldecode the string before inserting it into the database.
Cheers, g-force2k2 |
#4
|
||||
|
||||
Thanks guys.
In vB2 it needed to be in that urlencode format, but it seems in vB3 it needs to be the other way. Cheers!!! G |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|