protected function DatabaseConnection_sqlsrv::generateTemporaryTableName in Drupal driver for SQL Server and SQL Azure 7.2
Same name and namespace in other branches
- 7.3 sqlsrv/database.inc \DatabaseConnection_sqlsrv::generateTemporaryTableName()
Generates a temporary table name. Because we are using global temporary tables, these are visible between connections so we need to make sure that their names are as unique as possible to prevent collisions.
Return value
A table name.
Overrides DatabaseConnection::generateTemporaryTableName
1 call to DatabaseConnection_sqlsrv::generateTemporaryTableName()
- DatabaseConnection_sqlsrv::queryTemporary in sqlsrv/
database.inc - Override of DatabaseConnection::queryTemporary().
File
- sqlsrv/
database.inc, line 414 - Database interface code for Microsoft SQL Server.
Class
- DatabaseConnection_sqlsrv
- Summary of DatabaseConnection_sqlsrv
Code
protected function generateTemporaryTableName() {
static $temp_key;
if (!isset($temp_key)) {
$temp_key = strtoupper(md5(uniqid(rand(), true)));
}
return "db_temp_" . $this->temporaryNameIndex++ . '_' . $temp_key;
}