mirror of
https://github.com/agdsn/ancient-weatherstation.git
synced 2026-06-19 23:07:59 +00:00
heavy database optimizions
git-svn-id: file:///home/jan/tmp/wetterstation/trunk@243 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
@@ -40,7 +40,8 @@ class Module{
|
||||
$this->modName = $modName;
|
||||
$this->connection = &$connection;
|
||||
$this->parserInstance = &$parser;
|
||||
$this->table = $this->_getTableName();
|
||||
$this->sensInstance = new Sensor($sensId, $connection);
|
||||
$this->table = $this->sensInstance->get_table();
|
||||
|
||||
if (ModuleSet::isStandardPage($_REQUEST['setType']))
|
||||
$parser->parseContent($this->_getModuleFilename("frame"), & $this, "top"); /* Oberen Modulrahmen parsen */
|
||||
@@ -49,13 +50,6 @@ class Module{
|
||||
$parser->parseContent($this->_getModuleFilename("frame"), & $this, "bottom"); /* unteren Modulrahmen Parsen */
|
||||
}
|
||||
|
||||
function _getTableName(){
|
||||
/* Tabelle des Sensors bestimmen */
|
||||
$tableQuery = "SELECT tabelle FROM sensoren, typen WHERE sensoren.id=".$this->sensId." AND typen.typ = sensoren.typ";
|
||||
$table = $this->connection->fetchQueryResultLine($tableQuery);
|
||||
return $table['tabelle'];
|
||||
}
|
||||
|
||||
/* Dateinamen des Modul-Files zusammenbauen */
|
||||
function _getModuleFilename($modName){
|
||||
global $path;
|
||||
|
||||
Reference in New Issue
Block a user