Previous Thread
Next Thread
Print Thread
Hop To
#165100 10/06/2006 1:43 PM
Joined: Sep 2004
Posts: 152
Y
member
member
Y Offline
Joined: Sep 2004
Posts: 152
What would be the SQL query for replacing < and > in ubbt_USER_PROFILE > USER_SIGNATURE and ubbt_USER_PROFILE > USER_DEFAULT_SIGNATURE with respectively < and >

?

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
You'd want to do a database backup on this before hand just in case it causes any problems, but something like this *should* work:

UPDATE ubbt_USER_PROFILE SET USER_SIGNATURE = REPLACE(USER_SIGNATURE, '<','<')

UPDATE ubbt_USER_PROFILE SET USER_DEFAULT_SIGNATURE = REPLACE(USER_DEFAULT_SIGNATURE, 'glt;','>')

Joined: Sep 2004
Posts: 152
Y
member
member
Y Offline
Joined: Sep 2004
Posts: 152
Thank you Rick!

That worked.

I need these to regularly fix the signatures on our forums (their URLs contain a "?php" phrase, as they are dynamic). The sigs are turned into plain text as soon as users try to update their profiles.

I guess I have to store these as two separate SQL Queries right? I can't just paste both lines in the Control Panel's SQL Query window at once, right? As for now I have just entered and executed them one by one.

Unfortunately the </> are stored as </> as soon as you try to store the queries. I have stored them anyway, so that I can copy/paste and then edit them for future use wink

Last edited by Yomar; 10/06/2006 2:12 PM.
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Since they are both working on the same table you can try doing them as one query like:

UPDATE ubbt_USER_PROFILE
SET USER_SIGNATURE = REPLACE(USER_SIGNATURE, '<','<'),
USER_DEFAULT_SIGNATURE = REPLACE(USER_DEFAULT_SIGNATURE, 'glt;','>')

Joined: Sep 2004
Posts: 152
Y
member
member
Y Offline
Joined: Sep 2004
Posts: 152
Thank you Rick!

There were a few errors in that, but I got the idea:

UPDATE ubbt_USER_PROFILE SET USER_SIGNATURE = REPLACE(USER_SIGNATURE, '<','<'), USER_DEFAULT_SIGNATURE = REPLACE(USER_DEFAULT_SIGNATURE, '>','>')

Thanks a lot!


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Who's Online Now
0 members (), 381 guests, and 101 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)