ctyler69 Posted October 16, 2009 Share Posted October 16, 2009 Hello All, I am new to the forum and I would like to ask a question. Any advice would be appreciated. I work for a monthly advertising publication In Michigan. I am in the process of creating an application to stream line our business. I have a very good idea how to do this with the exception of entering contracts. When someone signs up they can run in our publication for as many months as they want and they do not have to be concurrent. When these are being entered, whoever is entering needs to be able to select months. Would it be best to set up a table for Months? Would there be a better way to do this? This is actually a very complex application that I have been working on and to tell you the truth I am a little befuddled that I am stuck on this seemingly simple dilemma. Any help, queries, theories or suggestions would be most appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/177865-using-months-as-its-own-table/ Share on other sites More sharing options...
kickstart Posted October 16, 2009 Share Posted October 16, 2009 Hi While there are ways around (for a start you could just use an array of months in php) it I would be tempted to just have a table of months and use that. I presume you have a table of adverts and a table linking those adverts to when they are run with a field for the month and year(so multiple rows per advert on the link table, one per year month). All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/177865-using-months-as-its-own-table/#findComment-937925 Share on other sites More sharing options...
ctyler69 Posted October 16, 2009 Author Share Posted October 16, 2009 Hi Keith, Thanks for the reply. Using an array is a good idea. I like that. The mailing goes to multiple areas and each contract can have multiple areas and multiple ad sizes and multiple months. I really appreciated it. Thanks again! Quote Link to comment https://forums.phpfreaks.com/topic/177865-using-months-as-its-own-table/#findComment-937971 Share on other sites More sharing options...
kickstart Posted October 16, 2009 Share Posted October 16, 2009 Hi If you keep it on a table you can easily use a join when you want to display it rather than having to decode it manually in php. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/177865-using-months-as-its-own-table/#findComment-937976 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.