Matrix result table

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Kunapuc
Forum Newbie
Posts: 1
Joined: Mon Sep 05, 2011 8:49 am

Matrix result table

Post by Kunapuc »

Hello, please tell me which way to look at php to create
matrix results?
Image
results are taken from the database.
[SQL]
--
-- Table structure for table `result`
--

CREATE TABLE IF NOT EXISTS `result` (
`id` int(2) NOT NULL AUTO_INCREMENT,
`homekey` int(2) NOT NULL, - домашняя команда
`awaykey` int(2) NOT NULL, - гостевая команда
`homescore` int(2) NOT NULL, - количество голов домашней команды
`awayscore` int(2) NOT NULL, - количество голов гостевой команды
`sezon` int(2) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `result`
--

INSERT INTO `qwerty` (`id`, `homekey`, `awaykey`, `homescore`, `awayscore`, `sezon`) VALUES
(1, 1, 4, 4, 0, 3),
(2, 1, 2, 3, 1, 3),
(3, 1, 3, 2, 3, 3),
(4, 5, 1, 4, 0, 3),
(5, 8, 1, 0, 4, 3),
(6, 9, 1, 3, 2, 3);

[/SQL]
Post Reply