Documentation

prepareMerge

array public
\Bitrix\Main\DB\SqlHelper::prepareMerge(
 string $tableName,
 array $primaryFields,
 array $insertFields,
 array $updateFields
);

This non-static method builds the strings for the SQL MERGE command for the specified table.

Parameters

ParameterDescriptionVersion
$tableNameTable name
$primaryFieldsArray of primary keys for list of columns:
Array("column")[]
$insertFieldsWhat to insert:
Array("column" => $value)[]
$updateFieldsHow to update:
Array("column" => $value)[]

Examples



© «Bitrix24», 2001-2024