kemper Posted June 12, 2007 Share Posted June 12, 2007 I am working on one of my sports websites and we are growing at a fast pace. We have 40 division with 7-8 teams within each division. I am not sure how to start what I vision, so assistance is greatly appreciated. My schedule table (from this past season) is structured as follows: CREATE TABLE `s2007schedules` ( `game_no` text NOT NULL, `status` text NOT NULL, `division` text NOT NULL, `gameid` text NOT NULL, `date` text NOT NULL, `time` text NOT NULL, `home` text NOT NULL, `h_score` text NOT NULL, `visitor` text NOT NULL, `v_score` text NOT NULL, `field` text NOT NULL, `field_no` text NOT NULL, I am envision is to have a drop down menu to select "Division". Once selected, another drop down menu would display the teams within that specific division. Now, I have half-assed the schedule from last season, so my table most likely needs modification to fit my vision. Do I need to create table to correspond with the "Divisions", and another table to correspond with the "teams" of those "Divisions" for the drop downs and how would I program those? Then, How do I code the drop downs to work with my query? Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/55196-team-specific-sports-schedules-display/ Share on other sites More sharing options...
pocobueno1388 Posted June 12, 2007 Share Posted June 12, 2007 First off, why are all the fields in your "s2007schedules" table set as TEXT? TEXT is for huge amounts of text. "game_no" I would assume just holds a number....so it should be an INT type. For the drop-down lists, you are going to need JavaScript and maybe some AJAX....that is if you want it to self-populate the drop-down without a page reload. Quote Link to comment https://forums.phpfreaks.com/topic/55196-team-specific-sports-schedules-display/#findComment-272907 Share on other sites More sharing options...
kemper Posted June 12, 2007 Author Share Posted June 12, 2007 Like I said, I half assed the schedule table. Last season, the game_id became numbers only, so yes it should be int. Before that it included a couple letters. What is ajax? Or, how would I use javascripts for this project. Quote Link to comment https://forums.phpfreaks.com/topic/55196-team-specific-sports-schedules-display/#findComment-272919 Share on other sites More sharing options...
pocobueno1388 Posted June 12, 2007 Share Posted June 12, 2007 I don't know much AJAX, so I wouldn't be able to help you too much. There is an AJAX forum though, you might want to try asking over there. Quote Link to comment https://forums.phpfreaks.com/topic/55196-team-specific-sports-schedules-display/#findComment-272923 Share on other sites More sharing options...
kemper Posted June 12, 2007 Author Share Posted June 12, 2007 Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/55196-team-specific-sports-schedules-display/#findComment-272924 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.