Function DatabaseConnector->query_insert

Definitions

sources/database.php

  • Insert a row.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: int

Parameters

Name Type Default Set Range Description
$table string required parameter N/A N/A The table name
$map array required parameter N/A N/A The insertion map. The map values may be arrays for a multi-insert, but if so they must all have the same arity. You must not pass an array of maps.
$ret boolean False N/A N/A Whether to return the auto-insert-id
$fail_ok boolean False N/A N/A Whether to allow failure (outputting a message instead of exiting completely)
$save_as_volatile boolean False N/A N/A Whether we are saving as a 'volatile' file extension (used in the XML DB driver, to mark things as being non-syndicated to Git)

Return

  • The ID of the new row (null: no ID / batch insert)
  • Type: ?integer
  • Set: N/A
  • Range: N/A