Skip to content

Instantly share code, notes, and snippets.

@miklos-szel
Last active May 18, 2018 17:50
Show Gist options
  • Select an option

  • Save miklos-szel/966b1d835e649e138493a69dffda6826 to your computer and use it in GitHub Desktop.

Select an option

Save miklos-szel/966b1d835e649e138493a69dffda6826 to your computer and use it in GitHub Desktop.
sample table
CREATE TABLE `users` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`username` CHAR(128),
`passwordhash` VARCHAR(32),
`description` TEXT,
`joined` datetime,
`last_visit` datetime,
PRIMARY KEY (`id`),
UNIQUE KEY `last_visit_username` (`last_visit`,`username`),
KEY `last_visit` (`last_visit`),
KEY `id_last_visit` (`id`,`last_visit`)
) ENGINE=MyISAM;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment