Mysql插入“MySQL返回空结果集" [英] Mysql insert "MySQL returned an empty result set"

查看:65
本文介绍了Mysql插入“MySQL返回空结果集"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不明白这个查询有什么问题?

I don't understand what's wrong with this query?

INSERT INTO files 
            (FILE, 
             season, 
             episode, 
             playlistname, 
             uuid,
             type
             ) 
VALUES      ('link', 
             1, 
             3, 
             'name', 
             '123555',
             1
             ) 

来自mysql的响应

MySQL 返回一个空结果集(即零行).(查询耗时 0.0002 秒)

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0002 sec)

==================================更新

================================= Update

我只是想跑插入文件(文件)值('文件')

结果是一样的.

我使用的是 mysql percona 5.6

I'm using mysql percona 5.6

表结构:

| files | CREATE TABLE `files` (
  `pfid` int(11) NOT NULL AUTO_INCREMENT,
  `post_id` varchar(11) DEFAULT NULL,
  `fDomain` varchar(20) DEFAULT NULL,
  `file` text CHARACTER SET utf8 NOT NULL,
  `playlistName` varchar(20) DEFAULT NULL,
  `thumbs_img` text,
  `thumbs_size` text,
  `thumbs_points` text,
  `poster_img` text,
  `mini_poster` varchar(20) DEFAULT NULL,
  `type` int(11) NOT NULL,
  `uuid` varchar(40) DEFAULT NULL,
  `season` int(11) DEFAULT NULL,
  `episode` int(11) DEFAULT NULL,
  `comment` text CHARACTER SET utf8,
  `time` varchar(40) CHARACTER SET utf8 DEFAULT NULL,
  PRIMARY KEY (`pfid`),
  KEY `ix_files__post_id_type` (`post_id`,`type`),
  KEY `ix_playlistName_Ep_Se` (`playlistName`,`season`,`episode`)
) ENGINE=InnoDB AUTO_INCREMENT=130030 DEFAULT CHARSET=latin1 |

推荐答案

你得到的结果(MySQL 返回一个空的结果集)意味着零行受到影响.查询中的列名称似乎与您的表中的名称不同.

The result you get (MySQL returned an empty result set) means that zero rows is affected. It seems that the columns names your using or there types in your query doesn't much the ones in your table.

检查表格中的列并注意它们区分大小写.如果它们很多,则查询必须运行良好.

Check the columns in your table and note the they are case-sensitive. If they much the query must run well.

问题可能是由您为列和季节分配的值引起的.将数字作为字符串插入时.试试这个:

The problem may be caused by the values your assigning to the columns and seasons. When inserting the numbers as string. Try this:

INSERT INTO files (FILE, season, episode, playlistname, uuid)
VALUES ('link', 1, 3, 'name', '123555') 

这篇关于Mysql插入“MySQL返回空结果集"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆