mysql - Cant use ENUM in new tables -
after updated wamp server mysql version 5.7.14, apache version 2.4.23, , php version 7.0.10. not sure if php version mather there if need it.
after updated i've not been able create new tables 1 or more of column uses enum
, after searching it, found thread recomended using ells enum
since have been working far, dont see problem it(?). after update error:
#1064 - have error in sql syntax; check manual corresponds mysql server version right syntax use near '0) not null , `rank` enum(0) not null , `avatar` varchar(255) not null , `' @ line 13
it works when removing enum columns need them. heres sql:
create table `az2983`.`users` ( `id` int(11) not null auto_increment , `username` varchar(255) not null , `email` varchar(255) not null , `firstname` varchar(255) not null , `lastname` varchar(255) not null , `question` varchar(255) not null , `answer` varchar(255) not null , `ip` int(25) not null , `active_ip` int(25) not null , `level` int(11) not null , `exp` int(11) not null , `title` enum(0) not null , `rank` enum(0) not null , `avatar` varchar(255) not null , `bio` varchar(1800) not null , `banner` varchar(255) not null , `f_post` int(11) not null , `f_threads` int(11) not null , `post` int(11) not null , `profile_visible` enum(0) not null , `link` varchar(255) not null , `born_date` date not null , `active` enum(0) not null , `timestamp` timestamp not null default current_timestamp , `banned` enum(0) not null , `founder` enum(0) not null , `awards` int(11) not null , `friends` int(11) not null , primary key (`id`)) engine = myisam;
you using enum
erations wrong. can't put in 0
because that's not enum, it's integer.
use this:
enum('x-small', 'small', 'medium', 'large', 'x-large')
Comments
Post a Comment