public function MigrateSourceMSSQL::getNextRow in Migrate 7.2
Same name and namespace in other branches
- 6.2 plugins/sources/mssql.inc \MigrateSourceMSSQL::getNextRow()
Implementation of MigrateSource::getNextRow().
Returns the next row of the result set as an object, dealing with the difference between the end of the batch and the end of all data.
File
- plugins/
sources/ sqlsrv.inc, line 199 - Define a MigrateSource for importing from Microsoft SQL Server databases.
Class
- MigrateSourceMSSQL
- Implementation of MigrateSource, to handle imports from remote MS SQL Server db servers.
Code
public function getNextRow() {
$row = sqlsrv_fetch_object($this->result);
// Might be totally out of data, or just out of this batch - request another
// batch and see
if (!is_object($row)) {
sqlsrv_num_rows($this->result);
$row = sqlsrv_fetch_object($this->result);
}
if (is_object($row)) {
return $row;
}
else {
return NULL;
}
}