修改bug
This commit is contained in:
parent
c0703ccfa3
commit
483da847cd
|
@ -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();
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -4,4 +4,5 @@ namespace Westdc\Visual;
|
|||
interface RecordInterface
|
||||
{
|
||||
public function outPut();
|
||||
public function getData();
|
||||
}
|
Loading…
Reference in New Issue