python01 Posted October 26, 2010 Share Posted October 26, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/216850-how-mysql-works-adding-daily-data/ Share on other sites More sharing options...
fenway Posted October 30, 2010 Share Posted October 30, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/216850-how-mysql-works-adding-daily-data/#findComment-1128491 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.