Re: PHP script to display monthly/yearly snow depth totals from diary.db
Posted: Fri 03 Jan 2025 6:08 pm
@lse-cumulus, @Dador and others who may be interested. I've been working on a version for CMX 4.3+ and am nearing completion (I hope). I've modified the appearance and of course in the middle of testing. I've added the ability to select a language and convert all the text on the webpage to the selected language. There are a few other areas I've been working on but it seems to be close to being finished. At least for the initial roll out. Anyway, I'm including a pic so you can get an idea of what's taking place (using test data). I appreciate your patience and @lse-cumulus thank you for what you have been doing to try keep the old version working.
lse-cumulus, you are correct. I had to choose how i wanted to use the depth input box on the previous version and I felt it was more important to record new falling snow. In the old version this field was named snowDepth. But now, in this new diary.db structure, snowDepth is still retained (where the values were stored if you followed my way of using the old version) and a new diary.db field named snow24h - for new snowfall. I guess what I'm trying to say is that all the entries stored from my previous snowSummary now has to be moved over to the snow24h column (field). I'm still working on a streamline way of doing this, or a person could just re-enter everything by hand. I used a sql statement to move the data from snowDepth to snow24h and replaced all the snowDepth cells with null. Anyhow, I'd be open to suggestions on how to move this data to the new snow24h field less painful.
lse-cumulus, you are correct. I had to choose how i wanted to use the depth input box on the previous version and I felt it was more important to record new falling snow. In the old version this field was named snowDepth. But now, in this new diary.db structure, snowDepth is still retained (where the values were stored if you followed my way of using the old version) and a new diary.db field named snow24h - for new snowfall. I guess what I'm trying to say is that all the entries stored from my previous snowSummary now has to be moved over to the snow24h column (field). I'm still working on a streamline way of doing this, or a person could just re-enter everything by hand. I used a sql statement to move the data from snowDepth to snow24h and replaced all the snowDepth cells with null. Anyhow, I'd be open to suggestions on how to move this data to the new snow24h field less painful.