#258587 - 05/27/0402:38 PMRe: Useful MySQL Queries for UBB.Threads
[Re: sdf123]
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
SELECT DISTINCT U_Language FROM w3t_Users
Edited by scroungr (05/27/0402:39 PM)
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
Ok, I have now decided to turn OFF display names, but some users still have display names in the DB...<br /><br />What would be the query to change everyone's display name to their login names? (So they are both the same)
?<br />UPDATE w3t_Users<br />SET U_Username = U_LoginName<br /><br />Although I'm not sure if that will pull their U_LoginName, or will actually give everyone the literal display name of "U_LoginName" so I wouldn't really recommend trying it. <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" />
#258592 - 06/07/0407:06 PMRe: Useful MySQL Queries for UBB.Threads
[Re: truck]
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
well what is normal ? heh <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> BUT you can try<br /><br />UPDATE w3t_Users SET U_Color = ''
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
#258593 - 07/06/0407:47 AMRe: Useful MySQL Queries for UBB.Threads
[Re: 234234]
DrChaos
Coder
Registered: 09/12/03
Posts: 816
Loc: Hollywood Florida.
If you want to make the color of the names the default color you have to type "Normal" into the color section. It will make them the forum default.<br /><br />So my guess is to do...<br />UPDATE w3t_Users SET U_Color = 'normal' <br />(could be worng though. dont run that unless you ask someone) <img src="http://www.ubbdev.com/forum/images/graemlins/smirk.gif" alt="" />
#258594 - 07/06/0407:53 AMRe: Useful MySQL Queries for UBB.Threads
[Re: Duck]
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
has to be normal? thought it could be empty? they change it? if it has to be normal then yes DrChaos is chaotically correct <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
#258595 - 07/06/0403:59 PMRe: Useful MySQL Queries for UBB.Threads
[Re: 234234]
DrChaos
Coder
Registered: 09/12/03
Posts: 816
Loc: Hollywood Florida.
I said I could be wrong <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />I canged a few and just removed the name of the color where edit the user and nothing happend.<br /><br />then one of my admins said to try to put "normal", because that what all the regular users are set to, and it worked.
#258596 - 07/06/0404:58 PMRe: Useful MySQL Queries for UBB.Threads
[Re: Duck]
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
well then you are right now wrong and I am wrong not right so glad to meet ya <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
#258597 - 10/28/0401:42 AMReview Forum Rules
[Re: charts]
ChAoS_dup1
Code Monkey
Registered: 11/15/02
Posts: 576
Loc: Great Northwest
Can anyone tell me the query to require all users to review the Forum Rules and accept or reject on their next visit to the board?<br /><br />It's that time <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
ChAoS Emerald Forest Gaming Servers Official STFU Thread
Anyone get brave enough to try this out? <br /><br />[] ?<br />UPDATE w3t_Users<br />SET U_Username = U_LoginName<br /><br />Although I'm not sure if that will pull their U_LoginName, or will actually give everyone the literal display name of "U_LoginName" so I wouldn't really recommend trying it. [/] <br /><br />I have a bunch of users who I need to make their eamil / fake email and user name / display name all match. A SQL call like this would save me a lot of time <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />P-
#258601 - 10/28/0403:40 PMRe: Useful MySQL Queries for UBB.Threads
[Re: mirko]
Anno
Code Monkey
Registered: 05/23/01
Posts: 562
Loc: Austria
>UPDATE w3t_Users<br />>SET U_Username = U_LoginName<br />>Although I'm not sure if that will pull their U_LoginName, or will actually give everyone the <br />>literal display name of "U_LoginName" so I wouldn't really recommend trying it.<br /><br />Test it with one name first.<br /><br />UPDATE w3t_Users<br />SET U_Username = U_LoginName <br />WHERE U_Number= 124124<br /><br />124124 = your user number
I ran the follwing query through MyPHPAdmin and it worked...<br /><br />UPDATE w3t_Users<br />SET `U_Username` = `U_LoginName` <br /><br />Thanks Anno<br /><br />P-
Here is the old query by RandyJG that JoshPet used in the Stylesheet Popularity mod. Since we have been able to store queries in the past couple of versions, the mod is no longer needed, but the query could still be helpful... <br /> <br />
Code:
<br />SELECT COUNT(*) as total,U_StyleSheet as style <br />FROM w3t_Users <br />GROUP BY U_StyleSheet <br />ORDER BY total DESC <br />