Answer the question
In order to leave comments, you need to log in
How to get the number of deleted rows?
Bitrix ORM does not provide a method for deleting rows by condition. How to get the number of deleted rows using \Bitrix\Main\DB\Connection::query
?
\Bitrix\Main\DB\Result::getSelectedRowsCount
returns null.
$connection = Application::getConnection();
do {
$query = $connection->query('delete from logs limit 10');
$numberOfRecordsDeleted = $query->getSelectedRowsCount(); // null
} while ($numberOfRecordsDeleted);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question