Jump to content
Server Maintenance This Week. ×

Sort Records By Null


This topic is 3094 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi, I have several fields I'd like to sort that are empty, like Email.  Here are 2 snippets of code that are not returning results:

$RandyFind->addFindCriterion("Email", '');

or

$RandyFind->addFindCriterion("Email", "==");

 

Any thoughts?  Also, is there a way to force null into a field when editing?

 

Thanks a Bunch!!

Link to comment
Share on other sites

Those are Find criteria, not Sort criteria, so I'm confused...

And blank is a valid editing value, so editing a field in a web form to be blank should then be reflected in the database when the edit is performed

Webko

Link to comment
Share on other sites

The correct syntax for finding an empty field is

$RandyFind->addFindCriterion("Email", "=");//one equal sign, not two

Another thing to try is to find anything ('*') in the field and then omit found records.  See this thread for one gotcha in this method.

Link to comment
Share on other sites

This topic is 3094 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.