Documentation

prepareMerge

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

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

Parameters

ParameterDescriptionVersion
$tableNameTable name
$primaryFieldsArray of primary keys in list of column types:
Array("column")[]
$insertFieldsArray of what to insert:
Array("column" => $value)[]
$updateFieldsArray of what to update:
Array("column" => $value)[]

Examples



© «Bitrix24», 2001-2024
Up