* Fix function db class.

This commit is contained in:
liyang
2022-08-09 14:15:32 +08:00
parent 3bd5ccc13f
commit 50adc3622e
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ INSERT INTO `zt_config` (`id`, `vision`, `owner`, `module`, `section`, `key`, `v
(6, 'rnd', 'system', 'project', '', 'unitList', 'CNY,USD'),
(7, 'rnd', 'system', 'project', '', 'defaultCurrency', 'CNY'),
(8, 'rnd', 'system', 'story', '', 'reviewRules', 'allpass'),
(10, 'rnd', 'system', 'common', 'global', 'version', '17.0.beta1'),
(10, '', 'system', 'common', 'global', 'version', '17.4'),
(11, 'rnd', 'system', 'common', 'global', 'sn', 'c8aa3269e181f2b9258ce96625de1497'),
(12, 'rnd', 'system', 'common', 'global', 'flow', 'full'),
(13, 'rnd', 'system', 'common', 'safe', 'mode', '1'),
+3 -1
View File
@@ -81,6 +81,8 @@ class db
$dbUsed = $this->getUsedDbList();
$lastDB = 0;
if(!empty($dbUsed)) $lastDB = max($dbUsed);
/* If all db is used. */
if($lastDB == $this->config->test->dbNum)
{
shell_exec("> $this->dbLogFile");
@@ -139,7 +141,7 @@ class db
*/
function initDB()
{
for($i = 1; $i < 11; $i++)
for($i = 1; $i <= $this->config->test->dbNum; $i++)
{
$this->dao->query('DROP DATABASE ' . $this->config->test->dbPrefix . $i);
$this->dao->query('CREATE DATABASE ' . $this->config->test->dbPrefix . $i);