amphp / mysql

An async MySQL client for PHP, optimizing database interactions with efficient non-blocking capabilities. Perfect for responsive, high-performance applications.
Other
359 stars 63 forks source link

Incrementing internal row counter when using fetchRow #13

Closed sagara- closed 9 years ago

sagara- commented 9 years ago

I've fixed a bug where ResultSet::genericFetch wasn't updating result->userFetched upon fetching a new row.

This would manifest itself as each newly fetched row being returned from fetchRow twice; once as the result from fetching the row, and then again on the second call since $this->result->userFetched < $this->result->fetchedRows.

I've also added a corresponding test case to ConnectionTest.

bwoebi commented 9 years ago

You are absolutely right, that I didn't respect that case; merged. And thanks a lot :+1: