修改bug

This commit is contained in:
Li Jianxuan 2014-05-21 09:57:28 +00:00
parent c0703ccfa3
commit 483da847cd
4 changed files with 32 additions and 32 deletions

View File

@ -15,19 +15,6 @@ class Sc extends Record implements RecordInterface
public $subset;
public function getData()
{
$sql = "SELECT * FROM datasands
ORDER BY
year ASC,
month ASC
";
$rs = $this->db->query($sql);
return $rs;
}
public function switchDataset()
{
if(empty($this->subset))
@ -51,6 +38,19 @@ class Sc extends Record implements RecordInterface
return;
}
public function getData()
{
$sql = "SELECT * FROM datasands
ORDER BY
year ASC,
month ASC
";
$rs = $this->db->query($sql);
return $rs;
}
public function outPut()
{
$this->switchDataset();

View File

@ -15,24 +15,6 @@ class SoilMoisture extends Record implements RecordInterface
public $subset;
public function getData()
{
$this->switchDataset();
$sql = "SELECT * FROM data_watercontent
WHERE
$this->subset > 0
ORDER BY
extract(day from \"timestamp\"),
extract(month from \"timestamp\"),
extract(year from \"timestamp\")
";
$rs = $this->db->query($sql);
return $rs;
}
public function switchDataset()
{
if(empty($this->subset))
@ -62,6 +44,24 @@ class SoilMoisture extends Record implements RecordInterface
return;
}
public function getData()
{
$this->switchDataset();
$sql = "SELECT * FROM data_watercontent
WHERE
$this->subset > 0
ORDER BY
extract(year from \"timestamp\"),
extract(month from \"timestamp\"),
extract(day from \"timestamp\")
";
//exit($sql);
$rs = $this->db->query($sql);
return $rs;
}
public function outPut()
{

View File

@ -18,7 +18,6 @@ class Record
extract(year from \"$fieldTime\") ASC,
extract(month from \"$fieldTime\") ASC,
extract(day from \"$fieldTime\") ASC,
extract(hour from \"$fieldTime\") ASC
";
$rs = $this->db->query($sql);

View File

@ -4,4 +4,5 @@ namespace Westdc\Visual;
interface RecordInterface
{
public function outPut();
public function getData();
}