修改含沙量数据读取方式

This commit is contained in:
Li Jianxuan 2014-05-28 08:45:29 +00:00
parent 175bd3c5bd
commit 552291bac7
9 changed files with 158 additions and 72 deletions

View File

@ -5,13 +5,15 @@ namespace Westdc\Visual\Reader;
use Westdc\Visual\Record;
use Westdc\Visual\RecordInterface;
class SoilMoisture extends Record implements RecordInterface
abstract class SoilMoisture extends Record implements RecordInterface
{
function __construct()
{
parent::__construct(__CLASS__);
}
public $tablename;
public $subset;
public function switchDataset()
@ -47,7 +49,7 @@ class SoilMoisture extends Record implements RecordInterface
{
$this->switchDataset();
$sql = "SELECT * FROM data_watercontent
$sql = "SELECT * FROM {$this->tablename}
WHERE
$this->subset > 0
ORDER BY

View File

@ -0,0 +1,12 @@
<?php
//土壤水分
namespace Westdc\Visual\Reader;
class SoilMoisture2007 extends SoilMoisture
{
function __construct()
{
parent::__construct();
$this->tablename = "data_watercontent2007";
}
}

View File

@ -0,0 +1,12 @@
<?php
//土壤水分
namespace Westdc\Visual\Reader;
class SoilMoisture2008 extends SoilMoisture
{
function __construct()
{
parent::__construct();
$this->tablename = "data_watercontent2008";
}
}

View File

@ -0,0 +1,12 @@
<?php
//土壤水分
namespace Westdc\Visual\Reader;
class SoilMoisture2009 extends SoilMoisture
{
function __construct()
{
parent::__construct();
$this->tablename = "data_watercontent2009";
}
}

View File

@ -0,0 +1,12 @@
<?php
//土壤水分
namespace Westdc\Visual\Reader;
class SoilMoisture2010 extends SoilMoisture
{
function __construct()
{
parent::__construct();
$this->tablename = "data_watercontent2010";
}
}

View File

@ -0,0 +1,12 @@
<?php
//土壤水分
namespace Westdc\Visual\Reader;
class SoilMoisture2011 extends SoilMoisture
{
function __construct()
{
parent::__construct();
$this->tablename = "data_watercontent2011";
}
}

View File

@ -0,0 +1,12 @@
<?php
//土壤水分
namespace Westdc\Visual\Reader;
class SoilMoisture2012 extends SoilMoisture
{
function __construct()
{
parent::__construct();
$this->tablename = "data_watercontent2012";
}
}

View File

@ -0,0 +1,12 @@
<?php
//土壤水分
namespace Westdc\Visual\Reader;
class SoilMoisture2013 extends SoilMoisture
{
function __construct()
{
parent::__construct();
$this->tablename = "data_watercontent2013";
}
}