Fix Database Table Name

This commit is contained in:
Yuan Chiu 2015-01-28 23:22:26 +08:00
parent 2e7ea6d6ab
commit 009d8eea2c
2 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ class DBStudyActivity extends Database {
protected function queryActivityByWhere($where) {
$sqlString = "SELECT `SaID`, `UID`, `ThID`, ".
"(SELECT `ThName` FROM `chu__Theme` AS `th` ".
"(SELECT `ThName` FROM `".$this->table('Theme')."` AS `th` ".
"WHERE `th`.`ThID` = `sa`.`ThID`) AS `ThName`, ".
"`StartTime`, ".
"FROM_UNIXTIME(UNIX_TIMESTAMP(`StartTime`)+(`LearnTime`+`Delay`)*60)".

View File

@ -30,7 +30,7 @@ class DBTheme extends Database {
$sqlString = "SELECT `ThID`, `ThName`, ".
"`ThLearnTime`, `StartTID`, `ThIntroduction`, ".
"`ThBuildTime`, `ThModifyTime`, ".
"(SELECT count(`TID`) FROM `chu__TBelong` AS `belong`
"(SELECT count(`TID`) FROM `".$this->table('TBelong')."` AS `belong`
WHERE `belong`.`ThID` = `theme`.`ThID`) AS `TargetTotal`".
"FROM `".$this->table('Theme')."` AS `theme` ".
"WHERE ".$where;