【问题标题】:MySQL data show nothing [closed]MySQL数据什么也没显示[关闭]
【发布时间】:2016-02-20 02:34:28
【问题描述】:

我在 mysql 数据库中插入韩文字符。 但是数据什么也没显示。以及在 PhpMyAdmin 中。 有谁知道什么是问题以及如何解决?

消息说 [Incorrect integer value: '' for column 'sido_id' at row 1]

create table sido (
        sido_id int(11) not null auto_increment,
        sido_name varchar(15) not null,
        primary key(sido_id)
)
ENGINE = MyISAM DEFAULT CHARSET utf8;


insert into sido (sido_id,sido_name) values ('','서울');

enter image description here

【问题讨论】:

  • 亲爱的 Doe 先生!根据网站规则,您应该post the code, not pictures/screens 。
  • 您是否直接从 UTF8 字符集符号表中复制了韩语符号?
  • 它说有警告。收到该消息后立即执行SHOW WARNINGS;
  • 我投票决定将此问题作为离题结束,因为它是作为一系列图像提出的,其中三个可以作为代码块复制粘贴
  • 插入后您会看到 1 行受影响,2 个警告。有哪些警告?使用show warnings 来查看它们。

标签: mysql database utf-8 phpmyadmin encode


【解决方案1】:

sido_IdAUTO_INCREMENT,数据类型是INT(),你在做什么?您在此列中插入空字符串。

AUTO_INCREMENT 列不需要使用空字符串。你可以这样使用:

INSERT INTO sido (sido_name) VALUES  ('서울');

【讨论】:

  • 感谢您的回答!!
  • @j-doe 很高兴帮助你...如果它有助于接受这个答案
  • 如何接受这个答案? @devpro
  • @j-doe 点击左边的勾
猜你喜欢
  • 1970-01-01
  • 2014-02-13
  • 1970-01-01
  • 2019-02-20
  • 1970-01-01
  • 2012-03-29
  • 1970-01-01
  • 1970-01-01
  • 2021-06-13
相关资源
最近更新 更多