Skip to content

Commit

Permalink
Used while loop for fetchColumn
Browse files Browse the repository at this point in the history
  • Loading branch information
yitam committed Aug 19, 2019
1 parent 3d8c68e commit ac50212
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/functional/pdo_sqlsrv/PDO81_MemoryCheck.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,11 @@ function RunTest($noPasses, $noRows, $tableName, $conn, $prepared, $mode)
case 6: // fetchColumn
$stmt = ExecuteQueryEx($conn, $tsql, ($prepared ? false : true));
$fldCount = $stmt->columnCount();
$result = $stmt->fetchColumn();
$rowCount = count($result);
unset($result);
// Check for "false" to terminate because fetchColumn may return NULL
while (($result = $stmt->fetchColumn()) !== false) {
unset($result);
$rowCount++;
}
$stmt->closeCursor();
unset($stmt);
if ($rowCount != $noRows) {
Expand Down

0 comments on commit ac50212

Please sign in to comment.