Hi there
I'm hoping somebody could help me..
I was planning on changing something on my index page that I have. It currently shows today's extremes aqnd at what time they were recorded ie; high temp, low temp, low humidity, high rain rate, high wind speed and high wind gust I was in the process of changing it to show a comparison with the same day 1 year ago. I managed to do that using a script that sfws made, which uses my sql database. However, I thought about it and changed my mind.
What I want to do now, is to show the record values for "today" whether it was set in 2017, or 2016 etc
I'm not savvy enough to be able to do it unfortunately. So, I wondered if anyone knew of a snippet or something similar which can extract those 6 values/times from my sql database.
Thank you in advance.
Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Script request
Moderator: daj
- mcrossley
- Posts: 12766
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Script request
A snippet to just do the MaxTemp, becuase you need different days for each value doing more than one in single query would be "tricky" Best to do a query for each one
Code: Select all
SELECT
LogDate,
MAX(`MaxTemp`)
FROM `daydata`
WHERE MONTH(`LogDate`) = MONTH(NOW())
AND DAYOFMONTH(`LogDate`) = DAYOFMONTH(NOW());