CREATE TABLE IF NOT EXISTS `apayments` (
`id` int(11) NOT NULL,
`amount` int(11) NOT NULL,
`payment_hash` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`towho` varchar(128) NOT NULL,
`money` enum('Pay','Ask') NOT NULL DEFAULT 'Pay',
`type` enum('email','text') NOT NULL DEFAULT 'email',
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
答案 0 :(得分:1)
删除email
附近的逗号
CREATE TABLE IF NOT EXISTS `apayments` (
`id` int(11) NOT NULL,
`amount` int(11) NOT NULL,
`payment_hash` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`towho` varchar(128) NOT NULL,
`money` enum('Pay','Ask') NOT NULL DEFAULT 'Pay',
`type` enum('email','text') NOT NULL DEFAULT 'email'
^^^^^^
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
答案 1 :(得分:0)
错误显示,因为有逗号的电子邮件尝试执行此命令
CREATE TABLE IF NOT EXISTS `apayments` (
`id` int(11) NOT NULL,
`amount` int(11) NOT NULL,
`payment_hash` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`towho` varchar(128) NOT NULL,
`money` enum('Pay','Ask') NOT NULL DEFAULT 'Pay',
`type` enum('email','text') NOT NULL DEFAULT 'email'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;