Useful Threads 7.x Queries - 07/14/2007 4:34 AM
I figure we should make a separate section for our useful Threads7 queries as to keep things separate from the Threads6 stuff (since they're not interchangeable).
SELECT
CONCAT('[*]',STYLE_NAME,'') AS Style,
CONCAT('(',COUNT(t2.STYLE_NAME),')') as Count
FROM ubbt_STYLES as t2,
ubbt_USER_PROFILE as t1
WHERE t1.USER_STYLE = t2.STYLE_ID
GROUP BY t2.STYLE_ID
ORDER BY t2.STYLE_NAME
[*]matt.DarkBlue (95)
[*]PaleCoffee (52)
[*]paradox.Grey (11)
[*]push.DarkBlue (26)
[*]sd.DarkDoom (25)
[*]sd.DarkGreen (16)
[*]sd.EW.65x.Dark (114)
[*]sd.Frosted (77)
[*]sd.MellowBlues (65)
[*]sd.Ubbdev.tweaked (78)
[*]Slate (49)
[*]Sunny.DropShadow (27)
[*]UbbCentral (100)
[*]UbbCentral.Classic (28)
[*]UbbThreads (81)
DELETE FROM ubbt_WATCH_LISTS
WHERE USER_ID IN
(SELECT USER_ID FROM ubbt_BANNED_USERS)
UPDATE ubbt_USER_PROFILE
SET USER_EMAIL_WATCHLISTS=0
WHERE USER_ID IN
(SELECT USER_ID FROM ubbt_BANNED_USERS)
update ubbt_USER_PROFILE set USER_ACCEPT_ADMIN_EMAILS="On" where USER_ID>50000
update ubbt_USER_PROFILE set USER_ACCEPT_ADMIN_EMAILS="On" where USER_ID>5000
UPDATE ubbt_POSTS SET USER_ID = "981" WHERE USER_ID = "1"
UPDATE ubbt_POSTS SET POST_POSTER_NAME = "The Team" WHERE USER_ID = "981"
UPDATE ubbt_TOPICS SET USER_ID ="981" WHERE USER_ID = "1"
UPDATE ubbt_TOPICS SET USER_ID ="981" WHERE TOPIC_LAST_POSTER_ID = "1"
UPDATE ubbt_TOPICS SET TOPIC_LAST_POSTER_NAME ="The Team" WHERE TOPIC_LAST_POSTER_NAME = "Anonymous"
update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');