Skip to content

Instantly share code, notes, and snippets.

@Pum-purum
Created July 10, 2019 07:07
Show Gist options
  • Save Pum-purum/3d5069bdcaf3e083e990495ecd41e84d to your computer and use it in GitHub Desktop.
Save Pum-purum/3d5069bdcaf3e083e990495ecd41e84d to your computer and use it in GitHub Desktop.
INSERT в базу Битрикс
$arFieldsToInsert = ['SITE' => $newLid, 'TOSITE' => $newLid, 'URLFROM' => $arRedirect['URLFROM'], 'URLTO' => $arRedirect['URLTO']];
$arInsert = $DB->PrepareInsert("v_redirect", $arFieldsToInsert);
$strSql = "INSERT INTO v_redirect(".$arInsert[0].") VALUES(".$arInsert[1].")";
$id = $DB->Query($strSql, false, "File: ".__FILE__."<br>Line: ".__LINE__);
if ($id) {
echo "Редирект с " . $arRedirect['URLFROM'] . " на " . $arRedirect['URLTO'] . " успешно скопирован <br>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment