sync
This commit is contained in:
17
modules/weatherAvg/weatherAvg.php
Normal file
17
modules/weatherAvg/weatherAvg.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace API;
|
||||
|
||||
trait weatherAvg
|
||||
{
|
||||
public function getData($params)
|
||||
{
|
||||
$query = "SELECT
|
||||
round(avg([AirTemp_DegC]),2) as value
|
||||
,convert(varchar, dt, 104) as dt
|
||||
FROM [ASUTP].[dbo].[Weather_Status]
|
||||
WHERE CAST(dt as DATE) BETWEEN '".$params['dateStart']."' AND '".$params['dateEnd']."'
|
||||
group by convert(varchar, dt, 104)";
|
||||
select($query);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user