Jump to content

team specific sports schedules display


kemper

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/55196-team-specific-sports-schedules-display/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

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