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? 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. 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
Archived
This topic is now archived and is closed to further replies.