Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Oct 2002
Posts: 105
ehm
Offline
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 105
I hate when it happens to me.
I read someone else question about how to change one field at whole users database.
Was someting like changing "Visible" or "Email Notifications"... one of those Yes/No awnser at the end of each users profile.
Was a SQL command to change all users to one kind of awnser.
Well, I lost it, and I used the Search and still didn't find it.
There is any chance to get that awnser again?
I just need one SQL line command to change all users to be Visible.
Thank you and sorry

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Depends on what you are looking for
Email Notification for instance if you want all members to yes you will need to do two sql queries since some are saved with a off and others are blank

UPDATE w3t_Users SET U_Notify='On' WHERE U_Notify='Off'

UPDATE w3t_Users SET U_Notify='On' WHERE U_Notify=''

You get the general drift from the command line above This will Update everyone to On so you can send email to all.

Joined: Oct 2002
Posts: 105
ehm
Offline
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 105
Thank you
I copy it and saved now
I just need one example, so I can figurout how the other fields will work

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Us the top one as an example then. The second one is because I noticed that specific field U_Notify sometimes people do not fill it in and the field is blank in the database so you need to do the second query to update all.

Now another example

UPDATE w3t_Users SET U_Title='newtitle' WHERE U_Number='theirusernumber'

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
And if you want to set everyone the same... for example set everyone to use the default stylseheet....

UPDATE w3t_Users
SET U_StyleSheet = 'usedefault'



Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
By George I think with all the examples he will be updating MYSQL in his sleep.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)