public function MergeQuery::insertFields

cis7 query.inc public MergeQuery::insertFields(array $fields, array $values = array())
cle7 query.inc public MergeQuery::insertFields(array $fields, array $values = array())
elmsmedia7 query.inc public MergeQuery::insertFields(array $fields, array $values = array())
icor7 query.inc public MergeQuery::insertFields(array $fields, array $values = array())
meedjum_blog7 query.inc public MergeQuery::insertFields(array $fields, array $values = array())
mooc7 query.inc public MergeQuery::insertFields(array $fields, array $values = array())

Adds a set of field->value pairs to be inserted.

Parameters

$fields: An array of fields on which to insert. This array may be indexed or associative. If indexed, the array is taken to be the list of fields. If associative, the keys of the array are taken to be the fields and the values are taken to be corresponding values to insert. If a $values argument is provided, $fields must be indexed.

$values: An array of fields to insert into the database. The values must be specified in the same order as the $fields array.

Return value

MergeQuery The called object.

File

includes/database/query.inc, line 1422
Non-specific Database query code. Used by all engines.

Class

MergeQuery
General class for an abstracted MERGE query operation.

Code

public function insertFields(array $fields, array $values = array()) {
  if ($values) {
    $fields = array_combine($fields, $values);
  }
  $this->insertFields = $fields;
  return $this;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.