Jump to content

Football team statistics - using PHP and a flat file database - how to display matches for each player


FootballStatto

Recommended Posts

Hi

I am the historian and statistican of my local soccer team. I want to be able to display different players and team statistics on our website, or just be able to have a simple database on my own PC.

I have searched the internet for different solutions, but found none I am happy with. Either overkill, too much job to set up or too reliant of third party hosts or databases.

So I have found it practical to use a flat file txt database for raw data, displaying match facts and counting number of games (and goals-not included in this test) for each different player. I enter records into this database after each match, and upload it to our site (and keep it localhost on my PC).

What I would want in addition, is a display of all the matches played by each individual player, listed on their individual player-profile-pages, with one game on each line. See example at the bottom of enclosed txt-file with code.

I am not able to code in php myself, but just about able to find different code snippets and put together to get what I want. I am aware that each players individual names or abbreviations must not match part of names of opposing teams. I have used four letter surnames in this test to get a more cleanly looking database.

I would be very happy if anyone could put together a code I can use to list each players individual matches in their players profile (like shown at the bottom of the code).

code.txt database.txt

Link to comment
Share on other sites

A flat file database is the worst decision you can make for keeping records. For a whole host of reasons I won't bother to go into here. Databases such as MySQL are easy to set up and easy to use with PHP (easier than managing a flat file). The only time I've seen a requirement for a flat file database is for school homework.

  • Like 1
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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