public function MigrateSourceMSSQL::computeCount in Migrate 7.2
Same name and namespace in other branches
- 6.2 plugins/sources/mssql.inc \MigrateSourceMSSQL::computeCount()
Return a count of all available source records.
File
- plugins/
sources/ sqlsrv.inc, line 130 - 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 computeCount() {
migrate_instrument_start('MigrateSourceMSSQL count');
if ($connect = $this
->connect()) {
$result = sqlsrv_query($connect, $this->countQuery);
$result_array = sqlsrv_fetch_array($result);
if ($result_array) {
$count = reset($result_array);
}
}
else {
// Do something else?
$count = FALSE;
}
migrate_instrument_stop('MigrateSourceMSSQL count');
return $count;
}