Mysql插入“MySQL返回空结果集"

编程入门 行业动态 更新时间:2024-10-12 14:25:24
本文介绍了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返回空结果集"

本文发布于:2023-11-22 01:12:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1615392.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Mysql   MySQL   quot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!