$results = $DB->Query("SELECT ID,REAL_URL,NEW_URL FROM b_sotbit_seometa_chpu WHERE REAL_URL='".$link."'"); if ($row = $results->Fetch()) { $arOneProp["NEW_URL"][] = $row[NEW_URL]; }
Второй вариант
$connection = \Bitrix\Main\Application::getConnection(); $resUp = $connection->query('UPDATE b_crm_contact SET DATE_CREATE = \''.$data[1].'\' WHERE ORIGIN_ID=\''.$data[0].'\''); if ($row = $resUp->Fetch()) { print_r($row); }
Создадим таблицу
$connection = \Bitrix\Main\Application::getConnection(); $sql = "CREATE TABLE bill_4_order (id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,new_number VARCHAR(30) NOT NULL,bitrix_number VARCHAR(30) NOT NULL,reg_date TIMESTAMP)";
Теги: Запрос к БД, $DB->Query, query, sqlТеги: Запрос к БД, $DB->Query, query, sql
01.04.2022