Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
I can never remember the rules for how NULL works with logical comparison operators. That's one reason why Rick should define all the columns as NOT NULL, unless there's really a good reason to do otherwise.

I would do:

UPDATE w3t_Users
SET U_AdminEmails = 'On'
WHERE U_AdminEmails <> 'Off' OR U_AdminEmails IS NULL

(This is assuming that you want to default to U_AdminEmails = 'On' for users who didn't indicate a preference, which increases the chances that someone might report you for spamming.)

And then do a SELECT query afterwards to see if it got everyone.

P.S. Here's a way of getting NULL values to show up as such when using the threads SQL command function (except the results would be misleading if there were any 'NULL', as opposed to NULL, values):

SELECT IF (U_Color IS NULL, 'NULL', U_Color) AS U_Color, COUNT(*)
FROM w3t_Users
GROUP BY U_Color

Sponsored Links
Entire Thread
Subject Posted By Posted
sending mass email to users Moab 09/12/2003 5:44 PM
Re: sending mass email to users slayer60 09/12/2003 5:52 PM
Re: sending mass email to users Moab 09/12/2003 8:15 PM
Re: sending mass email to users Moab 09/12/2003 8:24 PM
Re: sending mass email to users JoshPet 09/12/2003 8:24 PM
Re: sending mass email to users Moab 09/12/2003 8:48 PM
Re: sending mass email to users JoshPet 09/12/2003 9:21 PM
Re: sending mass email to users Moab 09/12/2003 9:26 PM
Re: sending mass email to users JoshPet 09/12/2003 10:09 PM
Re: sending mass email to users Moab 09/13/2003 5:29 AM
Re: sending mass email to users JoshPet 09/13/2003 5:36 AM
Re: sending mass email to users Dave_L_dup1 09/13/2003 3:18 PM
Re: sending mass email to users omegatron 09/13/2003 3:51 PM
Re: sending mass email to users Dave_L_dup1 09/13/2003 4:18 PM
Re: sending mass email to users omegatron 09/13/2003 4:50 PM
Re: sending mass email to users Moab 09/14/2003 5:51 AM
Re: sending mass email to users Moab 09/14/2003 5:56 AM
Re: sending mass email to users JoshPet 09/14/2003 5:59 AM
Re: sending mass email to users Moab 09/15/2003 12:53 AM
Re: sending mass email to users JoshPet 09/15/2003 12:55 AM
Re: sending mass email to users Moab 09/15/2003 4:35 AM
Re: sending mass email to users Dave_L_dup1 09/15/2003 4:46 AM
Re: sending mass email to users Moab 09/15/2003 5:52 AM
Re: sending mass email to users Dave_L_dup1 09/15/2003 5:59 AM
Re: sending mass email to users JoshPet 09/15/2003 6:27 AM
Re: sending mass email to users Dave_L_dup1 09/15/2003 6:54 AM
Re: sending mass email to users JoshPet 09/15/2003 7:30 AM
Re: sending mass email to users Dave_L_dup1 09/15/2003 3:11 PM
Re: sending mass email to users Moab 09/15/2003 4:25 PM
Re: sending mass email to users Dave_L_dup1 09/15/2003 4:32 PM
Re: sending mass email to users Moab 09/15/2003 5:09 PM
Re: sending mass email to users Moab 09/15/2003 5:11 PM
Re: sending mass email to users Dave_L_dup1 09/15/2003 5:14 PM
Re: sending mass email to users slayer60 09/15/2003 5:16 PM
Re: sending mass email to users Moab 09/15/2003 5:17 PM

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:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,583
Posts293,957
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 75951
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 2
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
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-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20261026)