Documentation

add

integer public
\Bitrix\Main[/link]\DB\Connection::add(
 string $tableName,
 array $data,
 string $identity = "ID"
);

This non-static method adds row to table and returns ID of the added row.

$identity parameter must be null when table does not have autoincrement columns.

Parameters

ParameterDescriptionVersion
$tableNameName of table for inserting new row.
$dataArray of columnName => Value pairs.
$identityFor Oracle only.

Exception

Examples



© «Bitrix24», 2001-2024
Up