Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE IF NOT EXISTS `table` (
- `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
- `name` TEXT NOT NULL,
- `description` TEXT NOT NULL,
- `login` TEXT NOT NULL,
- `password` TEXT NOT NULL,
- `old_passwords` TEXT NOT NULL,
- `last_update` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
- );
- CREATE UNIQUE INDEX uq_name_login ON table (name,login);
- INSERT INTO `table` (name, description, login, password, old_passwords, last_update, created)
- VALUES ("name", "description", "login", "pass", "oldPasswords", CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)
- ON DUPLICATE KEY UPDATE name = "n", description = "d", login = "l", password = "p", old_passwords = "oldp", last_update = CURRENT_TIMESTAMP;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement