Jump to content
desbest

How do I check if a field is blank or not, using a selector?

Recommended Posts

How do I check if a field is blank or not, using a selector?

I couldn't find any information on how to do this on the Selectors documentation, and on the forum.

I would like to use $pages->find()

Do I have a NULL variable and do something like 

$nullvar = NULL;
$companiesacceptedawaitingemail = $pages->find("template=company, approved=1, approval_email_sent_datenumber!=$nullvar");

 

Share this post


Link to post
Share on other sites

Checking for empty value is usually enough

$emptyPages = $pages->find("myField=''") // note the empty string with single quotes
$filledPages = $pages->find("myField!=''")

 

  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...