PHP interesse |
|
De koppeling is nodig omdat in de table RACE de namen van de spelers staan. Als de tijd in deze tabel is verlopen moet in de tabel USERS race_car_type dus op 0 worden gezet anders kunnen er geen nieuwe races worden gestart.
De opbouw is als volgt
RACE (autorace)
--
-- Table structure for table `autorace`
--
CREATE TABLE IF NOT EXISTS `autorace` (
`race_id` bigint(255) NOT NULL auto_increment,
`race_members` text NOT NULL,
`race_max_members` int(11) NOT NULL,
`race_creator` text NOT NULL,
`race_money` bigint(128) NOT NULL,
`race_date` text NOT NULL,
`race_type` tinyint(255) NOT NULL,
`race_winner` text,
PRIMARY KEY (`race_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ;
--
-- Dumping data for table `autorace`
--
INSERT INTO `autorace` (`race_id`, `race_members`, `race_max_members`, `race_creator`, `race_money`, `race_date`, `race_type`, `race_winner`) VALUES
(10, 'admin, demo123', 3, 'admin', 100000, ' 2010-05-31 18:28:44 ', 1, ' demo123'),
(9, 'admin, demo123', 3, 'admin', 100000, ' 2010-05-31 17:23:33 ', 1, ' demo123'),
(8, 'admin, demo123', 2, 'admin', 100000, ' 2010-05-31 17:06:45 ', 1, ' demo123'),
(11, 'admin, demo123, demo123', 3, 'admin', 100000, ' 2010-05-31 20:05:57 ', 1, ' demo123'),
(12, 'admin, demo123', 3, 'admin', 100000, ' 2010-05-31 20:11:59', 1, ' demo123');
-- -- Table structure for table `autorace` -- CREATE TABLE IF NOT EXISTS `autorace` ( `race_id` bigint(255) NOT NULL auto_increment, `race_members` text NOT NULL, `race_max_members` int(11) NOT NULL, `race_creator` text NOT NULL, `race_money` bigint(128) NOT NULL, `race_date` text NOT NULL, `race_type` tinyint(255) NOT NULL, `race_winner` text, ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ; -- -- Dumping data for table `autorace` -- INSERT INTO `autorace` (`race_id`, `race_members`, `race_max_members`, `race_creator`, `race_money`, `race_date`, `race_type`, `race_winner`) VALUES (10, 'admin, demo123', 3, 'admin', 100000, ' 2010-05-31 18:28:44 ', 1, ' demo123'), (9, 'admin, demo123', 3, 'admin', 100000, ' 2010-05-31 17:23:33 ', 1, ' demo123'), (8, 'admin, demo123', 2, 'admin', 100000, ' 2010-05-31 17:06:45 ', 1, ' demo123'), (11, 'admin, demo123, demo123', 3, 'admin', 100000, ' 2010-05-31 20:05:57 ', 1, ' demo123'), (12, 'admin, demo123', 3, 'admin', 100000, ' 2010-05-31 20:11:59', 1, ' demo123');
In users is dit
`race_car_type` int(255) unsigned NOT NULL default '0',
`race_car_type` int(255) unsigned NOT NULL default '0',
Is dit voldoende? |