diff --git a/src/include/dedesql.class.php b/src/include/dedesql.class.php
index 89b4caa8..ea35d86e 100755
--- a/src/include/dedesql.class.php
+++ b/src/include/dedesql.class.php
@@ -86,7 +86,7 @@ class DedeSql
}
function SelectDB($dbname)
{
- mysql_select_db($dbname);
+ mysql_select_db($dbname, $this->linkID);
}
//设置SQL里的参数
@@ -134,7 +134,7 @@ class DedeSql
exit();
}
$this->isInit = TRUE;
- @mysql_select_db($this->dbName);
+ @mysql_select_db($this->dbName, $this->linkID);
$mysqlver = explode('.',$this->GetVersion());
$mysqlver = $mysqlver[0].'.'.$mysqlver[1];
diff --git a/src/include/dedesqli.class.php b/src/include/dedesqli.class.php
index 57888446..4392c635 100755
--- a/src/include/dedesqli.class.php
+++ b/src/include/dedesqli.class.php
@@ -240,8 +240,12 @@ class DedeSqli
if($this->recordLog) {
$queryTime = ExecTime() - $t1;
$this->RecordLog($queryTime);
- //echo $this->queryString."--{$queryTime}
\r\n";
}
+ if (DEBUG_LEVEL===TRUE) {
+ $queryTime = ExecTime() - $t1;
+ echo "执行SQL:".$this->queryString.",执行时间:{$queryTime}
\r\n";
+ }
+
return $rs;
}
@@ -280,6 +284,10 @@ class DedeSqli
$this->RecordLog($queryTime);
//echo $this->queryString."--{$queryTime}
\r\n";
}
+ if (DEBUG_LEVEL===TRUE) {
+ $queryTime = ExecTime() - $t1;
+ echo "执行SQL:".$this->queryString.",执行时间:{$queryTime}
\r\n";
+ }
return mysqli_affected_rows($this->linkID);
}
@@ -333,6 +341,10 @@ class DedeSqli
$this->RecordLog($queryTime);
//echo $this->queryString."--{$queryTime}
\r\n";
}
+ if (DEBUG_LEVEL===TRUE) {
+ $queryTime = ExecTime() - $t1;
+ echo "执行SQL:".$this->queryString.",执行时间:{$queryTime}
\r\n";
+ }
if($this->result[$id]===FALSE)
{
@@ -349,15 +361,18 @@ class DedeSqli
function GetOne($sql='',$acctype=MYSQLI_ASSOC)
{
global $dsqli;
+ // $t1 = ExecTime();
if(!$dsqli->isInit)
{
$this->Init($this->pconnect);
- }
+ }
+ // echo ExecTime() - $t1;
if($dsqli->isClose)
{
$this->Open(FALSE);
$dsqli->isClose = FALSE;
}
+
if(!empty($sql))
{
if(!preg_match("/LIMIT/i",$sql)) $this->SetQuery(preg_replace("/[,;]$/i", '', trim($sql))." LIMIT 0,1;");
diff --git a/src/include/helpers/channelunit.helper.php b/src/include/helpers/channelunit.helper.php
index 6449c8c1..0c08a887 100755
--- a/src/include/helpers/channelunit.helper.php
+++ b/src/include/helpers/channelunit.helper.php
@@ -5,6 +5,7 @@
* @version $Id: channelunit.helper.php 1 16:49 2010年7月6日Z tianya $
* @package DedeCMS.Helpers
* @copyright Copyright (c) 2007 - 2020, DesDev, Inc.
+ * @copyright Copyright (c) 2020, DedeBIZ.COM
* @license http://help.dedecms.com/usersguide/license.html
* @link http://www.dedecms.com
*/
@@ -558,7 +559,7 @@ function MakeOneTag(&$dtp, &$refObj, $parfield='Y')
$dtp->Assign($tagid,$funcname($ctag,$refObj));
if (DEBUG_LEVEL==TRUE) {
$queryTime = ExecTime() - $ttt1;
- echo '标签:'.$tagname.'载入花费时间:'.$queryTime."
\r\n";
+ echo '标签:'.$tagname.'载入花费时间:'.$queryTime."
\r\n";
}
}
}