Created
July 10, 2013 11:42
-
-
Save OrenBochman/5965598 to your computer and use it in GitHub Desktop.
CMS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE subjects( | |
id INT(11) NOT NULL AUTO_INCREMENT, | |
menu_name VARCHAR(30) NOT NULL, | |
position INT(3) NOT NULL, | |
visible TINTINT(1) NOT NULL, | |
PRIMERY KEY(id) | |
); | |
CREATE TABLE pages( | |
id INT(11) NOT NULL AUTO_INCREMENT, | |
subject_id VARCHAR(30) NOT NULL, | |
menu_name INT(3) NOT NULL, | |
position INT(3) NOT NULL, | |
visible TINTINT(1) NOT NULL, | |
content TEXT, | |
PRIMERY KEY(id), | |
INDEX(subject_id) | |
); | |
CREATE TABLE admins( | |
id INT(11) NOT NULL AUTO_INCREMENT, | |
username VARCHAR(35) NOT NULL, | |
hased_password VARCHAR(60 ) NOT NULL, | |
PRIMARY KEY(id) | |
); | |
SHOW TABLEs; | |
SHOW COLUMNS FROM admins; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subjects | |
id | |
menu_name | |
position | |
visible | |
pages | |
id | |
subject_id (foreign key) | |
menu_name | |
position | |
visible | |
content | |
admins | |
id | |
username | |
hased_password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment