how to get record affected info ?

2 months ago

thcom
Member | 29
+
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

2 months ago

David Matějka
Moderator | 5933
+
0
-

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