This commit is contained in:
2026-01-13 12:36:57 +03:00
commit ebe1f5bd00
29 changed files with 2295 additions and 0 deletions

View 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);
}
}