Hello,
I want to make an weather website addon page, where users (with username&password) could input snow depth for their location on choosen date.
The result will then be seen in table on snow depth page.
I have experiences in php but nothing in mysql or javascript (don’t know which one to choose).
Please give me some proposals how to do it.
OK. We could do precision in cm (centimetres) 1cm, 2cm, 3cm, 10cm, 55cm…
Location is always individualy displayed in its row, doesn’t mater if has same amount of snow.
I see i can’t put images in the forum, im new user. (ht tp://www4.slikomat.com/13/0105/4rj-snowde.jpg)
I thought some like this, where is shown the last input from user (date and depth). This will be the base of the chart.
Then if it is possible to put some calendar on page where visitors could choose the date and all measures from that choosen date will be shown.
I’m still not sure I understand, so please correct me if I’m off.
There will be many Locations and Each Location will have many Dates.
But, for any Location-Date there will always be only 1 Depth.
I would probably CREATE a table like
location varchar NOT NULL
measure_date DATE NOT NULL
// date is a “reserved” word and naming a column that could lead to problems later
depth INT NOT NULL
I’m not sure an id would be helpful or even needed.
If the combined Location-Date can always have only a single Depth, I would think of using those as the combined PRIMARY KEY
You would need to think of a way to standardize the Location to prevent multiples that might happen from variations or typos. eg.
Vail Colorado
Vail CO
Vale CO
And I would use the database’s date format and convert it into more readable “human” format for display to make queries using it easier and more powerful.
I wouldn’t put the “cm” into the table but only the raw number, adding the “cm” to it for display only. This would make any Math operations you might eventually want to do easier.
First Thank You for your cooperation!
No problem for the delay. I don’t have any hurry.
I think that Your thoughts are correct.
About location, we now have 5 weather stations in the network and I think that we will grow to about 20-30 stations. Soo, I am going to give the location (user, password) to each of them to input their measuring.