Как вернуть последний id при Insert?? Я думал мей би так же называется как и в mysqli но нет ошибся. Подскажите плиз, не могу в доке найти
| Код |
|---|
connection = Bitrix\Main\Application::getConnection();
$sqlHelper = $connection->getSqlHelper();
$connection->queryExecute(
'INS ERT IN TO exp_comment (idUser, vendore, comment, rating) '
.' VALUES ('
.' "'.$sqlHelper->forSql($post['id_user']).'",'
.' "'.$sqlHelper->forSql($post['vendor_code']).'",'
.' "'.$sqlHelper->forSql($post['comment']).'",'
.' "'.$sqlHelper->forSql($post['rating']).'"'
.')');
$insert_id = $connection->insert_id; |