Reputation: 828
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
)
the response from mysql
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0002 sec)
================================= Update
I tried just to run
insert into files (file) values('file')
and the result is the same.
I'm using mysql percona 5.6
table structure:
| 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 |
Upvotes: 0
Views: 25534
Reputation: 7434
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')
Upvotes: 1
Reputation: 13
Verify the data types of you attributes. You VALUES list are all Strings, if one of those numbers (3 or 123555) are of a numeric type such as INT or Double etc, placing them in the single quotes like this '3' is telling MySQL that the value I a string.
INSERT INTO files
(FILE,
season,
episode,
playlistname,
uuid)
VALUES ('link', 1, 3, 'name', 123555)
Upvotes: 0
Reputation: 10233
That just means that for your query, it didn't return anything. That is normal for an INSERT
, as it isn't a SELECT
query and as such doesn't specifiy anything to return, so it doesn't return anything.
Upvotes: 1