SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,760
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Checking for Null

    I have a a field called "activation_code" in my Members table.

    Once a Visitor activates his/her account - and becomes a Member - the value in this field is erased.

    What is the proper way to check this field to see if it is Null?



    Debbie

  2. #2
    SitePoint Zealot
    Join Date
    Apr 2005
    Location
    London
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what do you mean by 'erased'?

    You can try
    where activation_code is null
    or
    where activation_code is not null

  3. #3
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,760
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jurn View Post
    what do you mean by 'erased'?
    Nulled out.

    Code PHP:
    $q = "UPDATE member
    	SET activation_code=NULL,
    		activated_on=NOW(),
    		updated_on=NOW()
    	WHERE (email=? AND activation_code=?)
    	LIMIT 1";


    Debbie


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •