}
+ function getType() {
+ return 'mssql';
+ }
+
/**
* todo: check if these should be true like parent class
*/
if ($offset) {
throw new DBUnexpectedError( $this, 'Database::limitResult called with non-zero offset which is not supported yet' );
} else {
- $sql = ereg_replace("^SELECT", "SELECT TOP $limit", $sql);
+ $sql = preg_replace("/^SELECT/i", "SELECT TOP $limit", $sql);
}
return $sql;
}
return $this->lastErrno() == 1205;
}
- /**
- * Begin a transaction, committing any previously open transaction
- * @deprecated use begin()
- */
- function immediateBegin( $fname = 'Database::immediateBegin' ) {
- $this->begin();
- }
-
- /**
- * Commit transaction, if one is open
- * @deprecated use commit()
- */
- function immediateCommit( $fname = 'Database::immediateCommit' ) {
- $this->commit();
- }
-
/**
* Return MW-style timestamp used for MySQL schema
*/
*/
function getServerVersion() {
$row = mssql_fetch_row(mssql_query('select @@VERSION'));
- return ereg("^(.+[0-9]+\\.[0-9]+\\.[0-9]+) ",$row[0],$m) ? $m[1] : $row[0];
+ return preg_match("/^(.+[0-9]+\\.[0-9]+\\.[0-9]+) /",$row[0],$m) ? $m[1] : $row[0];
}
function limitResultForUpdate($sql, $num) {