You are here

function pmpapi_query_tools_merge_query in Public Media Platform API Integration 7

Adds/updates query data.

Parameters

string $query: Name of a PMP query.

string $options: New/initial query parameters to be saved.

1 call to pmpapi_query_tools_merge_query()
pmpapi_query_tools_admin_config_submit in pmpapi_query_tools/pmpapi_query_tools.admin.inc
Form submission handler for pmpapi_query_tools_admin_config().

File

pmpapi_query_tools/pmpapi_query_tools.module, line 110
Allows admins to build, save, and execute PMP queries

Code

function pmpapi_query_tools_merge_query($query, $options) {
  db_merge('pmpapi_query_tools_queries')
    ->key(array(
    'name' => $query,
  ))
    ->fields(array(
    'options' => serialize($options),
  ))
    ->execute();
}