You are here

public function MigrateSourceMSSQL::computeCount in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 plugins/sources/sqlsrv.inc \MigrateSourceMSSQL::computeCount()

Return a count of all available source records.

File

plugins/sources/mssql.inc, line 124
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 ($this
    ->connect()) {
    $result = mssql_query($this->countQuery);
    $count = reset(mssql_fetch_object($result));
  }
  else {

    // Do something else?
    $count = FALSE;
  }
  migrate_instrument_stop('MigrateSourceMSSQL count');
  return $count;
}