Football tables
Posted: Wed Jan 19, 2005 9:38 am
Hi,
I am creating an interactive website where an administrator enters the football results which automatically updates the tables.
I am using MYSQL, PHP and Apache webserver which I am a new user.
So far i have created the tables and managed to in
put results into the database but am stuck in how to show the updated tables each time a result is entered.
Copy of creating tables script.
create database Tadburnfc;
#use Tadburnfc;
#show databases;
#show tables;
use Tadburnfc;
#drop table results;
#drop table leagueTable;
create table results (
season CHAR(10) NOT NULL,
age CHAR(15) NOT NULL,
homeTeam CHAR(30) NOT NULL,
awayTeam CHAR(30) NOT NULL,
fixtureDate DATE NOT NULL,
homeScore INT(3) UNSIGNED NOT NULL,
awayScore INT(3) UNSIGNED NOT NULL,
PRIMARY KEY(season, age, homeTeam, awayTeam) );
create table leagueTable (
season CHAR(10) NOT NULL,
age CHAR(15) NOT NULL,
team CHAR(30) NOT NULL,
played INT(4) UNSIGNED NOT NULL,
won INT(4) UNSIGNED NOT NULL,
lost INT(4) UNSIGNED NOT NULL,
drawn INT(4) NOT NULL,
goalsfor VARCHAR(4) NOT NULL,
goalsagainst VARCHAR(4) NOT NULL,
points INT(3) NOT NULL,
PRIMARY KEY(season, age, team) );
show tables;
describe results;
describe leagueTable;
Any help in how to show the updated tables on the website would be much appreciated.
Thanks.
If someone could point me in the right direction on the PHP code to use for example I would be grateful.
Thanks for any help to my problem.
Rgds,
Andy M
I am creating an interactive website where an administrator enters the football results which automatically updates the tables.
I am using MYSQL, PHP and Apache webserver which I am a new user.
So far i have created the tables and managed to in
Copy of creating tables script.
create database Tadburnfc;
#use Tadburnfc;
#show databases;
#show tables;
use Tadburnfc;
#drop table results;
#drop table leagueTable;
create table results (
season CHAR(10) NOT NULL,
age CHAR(15) NOT NULL,
homeTeam CHAR(30) NOT NULL,
awayTeam CHAR(30) NOT NULL,
fixtureDate DATE NOT NULL,
homeScore INT(3) UNSIGNED NOT NULL,
awayScore INT(3) UNSIGNED NOT NULL,
PRIMARY KEY(season, age, homeTeam, awayTeam) );
create table leagueTable (
season CHAR(10) NOT NULL,
age CHAR(15) NOT NULL,
team CHAR(30) NOT NULL,
played INT(4) UNSIGNED NOT NULL,
won INT(4) UNSIGNED NOT NULL,
lost INT(4) UNSIGNED NOT NULL,
drawn INT(4) NOT NULL,
goalsfor VARCHAR(4) NOT NULL,
goalsagainst VARCHAR(4) NOT NULL,
points INT(3) NOT NULL,
PRIMARY KEY(season, age, team) );
show tables;
describe results;
describe leagueTable;
Any help in how to show the updated tables on the website would be much appreciated.
Thanks.
If someone could point me in the right direction on the PHP code to use for example I would be grateful.
Thanks for any help to my problem.
Rgds,
Andy M