Skip to content

Instantly share code, notes, and snippets.

@matthewphewes
Created May 15, 2013 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewphewes/abc0e73805bd6cc60357 to your computer and use it in GitHub Desktop.
Save matthewphewes/abc0e73805bd6cc60357 to your computer and use it in GitHub Desktop.
The table required to save/retrieve data from submitted score results. MySQL
delimiter $$
CREATE TABLE `games_leaderboard` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`game` varchar(45) DEFAULT NULL,
`name` varchar(45) DEFAULT NULL,
`score` int(3) DEFAULT NULL,
`timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`user` int(11) DEFAULT NULL,
`session` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `session_UNIQUE` (`session`)
) ENGINE=MyISAM AUTO_INCREMENT=223 DEFAULT CHARSET=utf8$$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment