Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.