now let's talk about the user table. My simple table only have simple like
- name;
- password;
- email;
- real name;
- birth;
Other setting would be place on user_detail
user
CREATE TABLE IF NOT EXISTS `tb_user` (
`u_id` int(11) NOT NULL AUTO_INCREMENT,
`u_name` varchar(30) NOT NULL,
`u_pass` varchar(50) NOT NULL,
`u_mail` varchar(100) NOT NULL,
PRIMARY KEY (`u_id`),
UNIQUE KEY `u_name` (`u_name`,`u_pass`,`u_mail`)
)
user-detail
CREATE TABLE IF NOT EXISTS `tb_userdetail` (
`udet_user` int(11) NOT NULL AUTO_INCREMENT,
`udet_realname` varchar(50) NOT NULL,
`udet_birth` date NOT NULL,
`udet_other` text,
PRIMARY KEY (`udet_user`)
)
Tidak ada komentar:
Posting Komentar