Jump to content

How mySQL works, adding daily data?


python01

Recommended Posts

I am new to databases and to web design at all and have to wrap my mind around how some stuff is done in mySQL.

Lets say I want to have mySQL database to store daily weather conditions in major cities, which means I would have table with date, temperature, cloud cover, humidity, wind direction and wind speed. How would this be accomplished in mySQL? Would I have to create new table for each city every day and put this data into it or is there a function to add new table every day with the same template just by naming the original table/template? Would they be named automatically and which php keywords be used to do it? What is the auto-increment for?

Link to comment
https://forums.phpfreaks.com/topic/216850-how-mysql-works-adding-daily-data/
Share on other sites

That's quite a bit to chew off at once.

 

You could have table with columns for all of that info, plus another few with city_id.

 

Not sure what you mean by "template" or "automatic".

 

And auto-increment is used for getting unique number for each row in a given table.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.