PHP Classes

File: example/auth.sql

Recommend this page to a friend!
  Classes of Andrey Gadyukov   Tiny Auth   example/auth.sql   Download  
File: example/auth.sql
Role: Auxiliary data
Content type: text/plain
Description: Example sql database dump
Class: Tiny Auth
Authenticate users with records stored in MySQL
Author: By
Last change:
Date: 11 years ago
Size: 1,606 bytes
 

Contents

Class file image Download
/* Navicat MySQL Data Transfer Source Server : mysq_local Source Server Version : 50527 Source Host : localhost:3306 Source Database : auth Target Server Type : MYSQL Target Server Version : 50527 File Encoding : 65001 Date: 2012-10-06 23:56:21 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `roles` -- ---------------------------- DROP TABLE IF EXISTS `roles`; CREATE TABLE `roles` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `name` varchar(20) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of roles -- ---------------------------- INSERT INTO `roles` VALUES ('1', 'User'); INSERT INTO `roles` VALUES ('2', 'Admin'); -- ---------------------------- -- Table structure for `users` -- ---------------------------- DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `pass` varchar(50) NOT NULL, `name` varchar(50) DEFAULT NULL, `role_id` smallint(6) NOT NULL, `login` varchar(6) NOT NULL, PRIMARY KEY (`id`), KEY `rolefk` (`role_id`), CONSTRAINT `rolefk` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of users -- ---------------------------- INSERT INTO `users` VALUES ('1', 'ec5032217f6ab752c67b23deb29fb05e', 'test', '1', 'test'); INSERT INTO `users` VALUES ('2', 'f802da654bfe8057e4275a95fe573a5e', 'admin', '2', 'admin');