Fix DB-2609: PHP: obtain affected rows