douchun1948 2014-11-21 05:34
浏览 170
已采纳

结果包含多行SQL = INSERT INTO

While inserting first time it gives following error: "Result consisted of more than one row". When i try to insert record second time it gives error with message duplicate entry.

 SQL=INSERT INTO `master_user` (`name`,`user_name`,`email`,`password`,`system_name_of_friend`,`system_no_of_friend`,`registered_from_site`,`registered_on`,`is_existing_user`) VALUES ('FirstName LastName','username','demo@mail.com','8c71eede42e38709e9e836021b0b9b9b','','','site','','1')

any one help will be appropriated and following is the table structure which will be get help to tracking this issue very easily and get the solution for this.

CREATE TABLE IF NOT EXISTS `master_user` (
  `master_user_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `system_name_of_friend` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `system_no_of_friend` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `registered_from_ip` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL,
  `registered_from_site` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL,
  `registered_on` datetime DEFAULT NULL,
  `is_existing_user` bit(1) NOT NULL DEFAULT b'0',
  PRIMARY KEY (`master_user_id`),
  UNIQUE KEY `ukMasterUser_email` (`email`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1293 ;
  • 写回答

1条回答 默认 最新

  • duangang2825 2014-11-22 08:29
    关注

    I have changed the few words from column Which are conflicting and resolved.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样