Permalink
Browse files

dml-sqlsrv MDL-26025 Removed use of property to track rownumber field…

… in favor of always unsetting it
  • Loading branch information...
Sam Hemelryk
Sam Hemelryk committed Feb 7, 2011
1 parent 7e1bd89 commit fe1dd7ebde36ed0a97b7b099a0977a9174cc5d9b
Showing with 1 addition and 7 deletions.
  1. +1 −7 lib/dml/sqlsrv_native_moodle_recordset.php
@@ -32,7 +32,6 @@ class sqlsrv_native_moodle_recordset extends moodle_recordset {
protected $rsrc;
protected $current;
- protected $hasrownumber = null;
public function __construct($rsrc) {
$this->rsrc = $rsrc;
@@ -45,12 +44,7 @@ public function __destruct() {
private function fetch_next() {
if ($row = sqlsrv_fetch_array($this->rsrc, SQLSRV_FETCH_ASSOC)) {
- if ($this->hasrownumber === null) {
- $this->hasrownumber = array_key_exists('sqlsrvrownumber', $row);
- }
- if ($this->hasrownumber) {
- unset($row['sqlsrvrownumber']);
- }
+ unset($row['sqlsrvrownumber']);
$row = array_change_key_case($row, CASE_LOWER);
}
return $row;

0 comments on commit fe1dd7e

Please sign in to comment.