Hi.
I'm working on a fairly good sized project and wondered if I could get some advice from you guys who are definately more PHP savvy than I am... I'm a fairly new user of it myself. What I need is some ideas and the like that will help me make some decisions on what I need to do to accomplish the project.
This will probably be a fairly large post, so I apologize in advance for the size.
Basically, I am involved in a group who plays a combat flight sim regularly online. I've decided to work to design a web application with PHP and MySQL where the guys ("pilots" if you will) will be able to log a "flight report", and then have a scoreboard page where these "flight reports" are displayed. I already have the site authentication and everything all ready to go... I just nee to get working on the Database and "Flight Report" form now... and that's where my problem lies.
My original idea was to have three "sets" of tables... one called "Missions" (where each individual mission is entered, each entry having a Unique ID# with the pilot who filed the report's Callsign included in a field for reference), one called "Pilots" (where the "totals" of everything were grouped together... for example, Air to Air Kills, Air to Ground Kills, Flight Time, etc.), and a group of tables for "Lookup Tables" (where all the in-game target types were stored with their point values for reference from the Flight Report form).
Basically how I had originally planned this to work was that a "Pilot" would head to the "Flight Report" page, and fill out the form there with the data from his last mission. The form would reference the "Lookup Tables" in dropdown menus and keep those fields in a variable until the form was submitted. When the form was submitted the values in the Form would create a new Unique ID# entry in the "Missions" Table with all the relevant data. At the same time, the Pilot's line in the "Pilots" table (by referencing the Callsign field in the "Missions" Table) would be updated accordingly by adding to his total scores / flight time, etc.
Well... I got to thinking about it, and began to wonder if I even needed a "Pilots" Table at all. So, that brings me to my first question...
- Do I even need a "Pilots" Table in the database? Isn't there a way to set up a Scoreboard page to show the "totals" of a specific pilot's scores just by referencing the "Missions" Table? Or would that require more coding that would be worth the time?
Another issue I've run into is that I've thought to try to record each "type" of "kill" in the "Missions" Table when a mission is reported (for example, fighters, bombers, recon aircraft, etc.). But on the Scoreboard, I just want the "total" kills in numerical format (say a pilot has 3 fighter kills and 5 bomber kills... I just want the scoreboard to show "8" kills in the Air to Air Kills field on the Scoreboard page).
Currently, I have the "Flight Report" form created and just entering data into the "Missions" table so far, but haven't gone any further than that due to the questions above.
What I am asking for mostly is how some of you would approach this problem, and what the syntax would be to get some of this accomplished from a coding perspective. Addmitedly, I'm fairly new at this, but have been digging hard to find solutions that will work but still leave the system flexible enough that I can make changes in the future without having to perform a complete overhaul of the database and php coded pages.
Well... thanks for your time... and I look forward to hearing from anyone about this.