search blank value in datastore

sbhadauria
@sbhadauria
9 years ago
129 posts
I have a license module and I want to get items from license module if end date is blank.

Below mentioned code is not working:
$_l = array(
'search' => array(
"license_end_date = ''"
),
);
$_rt = jrCore_db_search_items('xxLicense', $_l);

Please suggest?
updated by @sbhadauria: 08/27/15 07:35:16PM
brian
@brian
9 years ago
10,148 posts
You will have to use jrCore_db_get_items_missing_key() - i.e.

jrCore_db_get_items_missing_key('my_module', 'license_end_date');

You cannot use jrCore_db_search_items() since there are no "blank" values in a datastore.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags