how to get record affected info?

thcom
Backer | 94
+
0
-

hi, i try really to search but google nor nette web does not answered me

how can i get how many recoord was affected by query ?

like mysql_affected_rows() function

for exapmle :

$result = $this->database->query('DELETE FROM people WHERE age > 45');

i try to dump $result but found nothing helpfull

many thanks TH

David Matějka
Moderator | 6445
+
0
-

$result is an instance of Nette\Database\ResultSet, where you can find method getRowCount()