 |
 |
 |
 |
#258506 - 09/11/03 02:25 AM
Useful MySQL Queries for UBB.Threads
|
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Add to del.icio.us
Digg it
|
Backup your database first to be safe. <br /> <br />1) Query the DB to see how many members will allow the Admin to send them bulk emails. <br /> <br />SELECT COUNT(*) FROM w3t_Users WHERE U_AdminEmails='On' <br /> <br />2) Query to set all users to the default aged threads to be displayed (what is set per forum as that forum's default). <br /> <br />UPDATE w3t_Users <br />SET U_ActiveThread = "999" <br /> <br />3) Query to set all users to the default parent posts per page shown. <br /> <br />UPDATE w3t_Users <br />SET U_PostsPer = "10" <br /> <br />4) Query to set all users to the default total posts per page shown (when in flat mode). <br /> <br />UPDATE w3t_Users <br />SET U_FlatPosts = "10" <br /> <br />5) Query to allow all members to receive email from admins. <br /> <br />UPDATE w3t_Users SET U_AdminEmails = 'On' WHERE U_Number > 1 <br /> <br />6) Query to set all members to receive an email notification when they receive a private message. <br /> <br />UPDATE w3t_Users <br />SET U_Notify = 'On' <br /> <br />7) Query to change the displayed date that a post was made. <br /> <br />UPDATE w3t_Posts SET B_Posted = UNIX_TIMESTAMP('2003-06-14 20:05:00') WHERE B_Number = 123456 <br /> <br />Note: Depending on whether it's the last post in a thread or board, you'd have to do similar updates for the main post in the thread and the board that contains the thread. <br /> <br />8) Query to make ALL forums members only. <br /> <br />UPDATE w3t_Boards <br />SET Bo_Read_Perm = '-1-2-3-', Bo_Write_Perm = '-1-2-3-', Bo_Reply_Perm = '-1-2-3-' <br /> <br />"But if you have any boards that are only supposed to be accessible to admins, mods or other special groups, their permissions would get reset, unless you add an appropriate WHERE clause. " <br /> <br />9) Query to delete all users that have not logged-in since they registered. Submitted by Akd96 <br /> <br />DELETE FROM w3t_Users WHERE `U_Laston` = `U_Registered` <br /> <br />10) Query to Update All Users to use the default stylesheet that you've defined in the Theme file Submitted by JoshPet <br /> <br />UPDATE w3t_Users <br />SET U_StyleSheet = 'usedefault' <br /> <br />11) Query to manually approve a user if the user hasn't verified the account yet. <br /> <br />UPDATE w3t_Users SET U_Approved='yes' WHERE U_Username='whatever' <br /> <br />(whatever would be the username) <br /> <br /> <br /> <br />Thanks to all who have posted these in the past. (Dave_L, Rick, me, etc... <img src="/forum/images/graemlins/wink.gif" alt="" /> ) and to Mr.CSS for the idea. <br /> <br /> <br />
Edited by JoshPet (09/11/03 11:49 AM)
|
|
Top
|
|
|
|
 |
 |
 |
 |
| |