Non-populated integer typed parameter handling

(4 posts) (2 voices)
  1. nsepetys, Member

    Hello myDBR representative,

    How are you doing? I just noticed that since our upgrade to myDBR version 4.3.3 over this weekend we have had one particular report started passing "0" instead of NULL for empty integer typed parameters. I checked out report logs and it does not look like the report procedure, parameters, or defaults were changed. I'm not sure what, other than the update, might have caused the change in the handling of non-populated integer typed parameters. Any assistance is appreciated!


  2. myDBR Team, Key Master

    This has actually moved into defaults. By default numeric values pass zero and strings pass an empty string. You change the default in user/defaults.php. To default to null values, change:

    $mydbr_defaults['parameters']['empty_numeric_results_null'] = true;
    $mydbr_defaults['parameters']['empty_string_results_null'] = true;

    myDBR Team

  3. nsepetys, Member

    Thanks, as always, for your expedient reply. I will go ahead and make the numeric default change to our default file. Can you confirm though that the default for the empty string was originally an empty string (as opposed to NULL)? I believe this is the case I just want to be sure that everyone that runs into this same situation knows what the existing defaults were when checking their own reports that have optional parameters.

  4. myDBR Team, Key Master

    Empty strings were passed as NULL in older versions. This is really matter of preference. With empty string it is easier to do wildcard searches (no need to handle the null), but NULL is more consistent with other datatypes (like date) which do not have "empty" value.

    With the default option, you can now choose the format that suits you best.
    myDBR Team


You must log in to post.