By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

check != NULL

tolkienarda
100+
P: 316
hi all i need to check in a database to see if a value is null

i don't remember what i put in for null
Expand|Select|Wrap|Line Numbers
  1. mysql_query("SELECT name FROM dbase WHERE fcc != NULL");
  2.  
my question is the part where it is fcc != NULL correct of do i put a 0 or '' instead of null

thanks

eric
Apr 26 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 534
The correct syntax is
Expand|Select|Wrap|Line Numbers
  1. WHERE fcc IS NULL
  2. -- or
  3. WHERE fcc IS NOT NULL
  4.  
Apr 26 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.