make GetTempTableName more robust
This commit is contained in:
parent
93c486b068
commit
a917cfbf2c
|
@ -21,9 +21,10 @@ function GetTempTableName($table = '')
|
|||
{
|
||||
// A temporary table name with the '#' prefix will be automatically
|
||||
// dropped once the connection is closed
|
||||
$random = mt_rand(1,1000);
|
||||
$timestamp = round(microtime(true)*1000);
|
||||
if (strlen($table) == 0)
|
||||
return "#pdo_test_table" . $timestamp;
|
||||
return "#php_test_table" . '_' . $timestamp . '_' . $random;
|
||||
else
|
||||
return $table . $timestamp;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue