That is weird, can you run this query to see if the table got created?
CREATE TABLE wp_ratings (
rating_id int(11) NOT NULL AUTO_INCREMENT,
rating_postid int(11) NOT NULL,
rating_posttitle text CHARACTER SET utf8 NOT NULL,
rating_rating int(2) NOT NULL,
rating_timestamp varchar(15) CHARACTER SET utf8 NOT NULL,
rating_ip varchar(40) CHARACTER SET utf8 NOT NULL DEFAULT ”,
rating_host varchar(200) CHARACTER SET utf8 NOT NULL DEFAULT ”,
rating_username varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT ”,
rating_userid int(10) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (rating_id)
) DEFAULT CHARSET=utf8mb4;
Yes, it creates it, but if I disable and enable the plugin, here the error..
[You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘rating_postid INT(11) NOT NULL ,rating_posttitle TEXT NOT NULL,rating_rating INT’ at line 1]
ALTER TABLE wp_ratings CHANGE COLUMN rating_id rating_id INT(11) NOT NULL auto_increment,rating_postid INT(11) NOT NULL ,rating_posttitle TEXT NOT NULL,rating_rating INT(2) NOT NULL ,rating_timestamp VARCHAR(15) NOT NULL ,rating_ip VARCHAR(40) NOT NULL ,rating_host VARCHAR(200) NOT NULL,rating_username VARCHAR(50) NOT NULL,rating_userid int(10) NOT NULL default ‘0’,PRIMARY KEY (rating_id)
Same error after last plugin update. Seems incredible.
[You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘rating_postid INT(11) NOT NULL ,rating_posttitle TEXT NOT NULL,rating_rating INT’ at line 1]
ALTER TABLE wp_ratings CHANGE COLUMN rating_id rating_id INT(11) NOT NULL auto_increment,rating_postid INT(11) NOT NULL ,rating_posttitle TEXT NOT NULL,rating_rating INT(2) NOT NULL ,rating_timestamp VARCHAR(15) NOT NULL ,rating_ip VARCHAR(40) NOT NULL ,rating_host VARCHAR(200) NOT NULL,rating_username VARCHAR(50) NOT NULL,rating_userid int(10) NOT NULL default ‘0’,PRIMARY KEY (rating_id)
Sorry man, I have no idea what is the problem. I suggest you trying a new installation of WP with just this plugin somewhere on your server to see if you can reproduce the problem.
HI, i had the same problem, but i found the solution. But first Lester Chan, thanks for great job. I dont know wordpress because i just starting with it, and I don’t know why it works, but I notice, that the problem is in mysql database, in table “posts” column “post_parents” must be 0, for ID=rating_id. If not, it will be error “Post-id not valid: post ID #”