Update a search definition in Emma.
Arguments:
Both $criteria and $search_name are optional, but you need to supply at least one of them to update. If you do not wish to update the search criteria, pass null as the argument.
Use:
require_once('../../MyEmmaPHP.php');
try {
$me = new MyEmmaPHP();
$search_id = 19200;
$name = 'PeopleSoft Members with Weekly Email Pref';
$criteria =
array(
"and",
array(
"or",
array("group", "in", "General: Marketing Contacts Only - PeopleSoft"),
array("group", "in", "SIG: PeopleSoft Compensation & Benefits"),
array("group", "in", "Product: PeopleSoft"),
array("group", "in", "Interest: Absence Management")
),
array(
"or",
array("member_field:wildcard_1355694", "undefined"),
array("member_field:wildcard_1355694", "contains", "Weekly"),
array("member_field:wildcard_1355694", "contains", "Not Specified")
)
);
$retval = $me->updateSearch($search_id, $criteria, $name);
if ($retval) {
echo "Search updated successfully.\n";
} else {
echo "Search not updated.\n";
}
} catch ( Exception $e ) {
echo $e->getMessage() . "\n\n";
}
Wrapper for: update_search
People talking about '@synergycode':