2011-11-04, 08:42 PM
i was up to delete Duplicate posts and i am success but the real problem came up on SQL.
I want to change the value of mybb_posts > Structure > AUTO_INCREMENT it's give me error
but in original mybb_posts > Structure > AUTO_INCREMENT it's fine can any one explain what i should do ??
screen shoot
ok let me explain what did i actually do
To remove duplicate post i write a sql query
CREATE TABLE mybb_postsx as
SELECT * FROM mybb_posts WHERE 1 GROUP BY subject;
all duplicate post was remove but the thread was there so i write down again this
CREATE TABLE mybb_threadsx as
SELECT * FROM mybb_threads WHERE 1 GROUP BY subject;
the thread also removed then i run Recount & Rebuild every think become perfect but when i post something it's show the thread name but there was no post created i have look in to the database the post have submitted and saved but the PID and TID was 0 .. i look back to the old table and the value settings i found the AUTO_INCREMENT disabled on my new table .. can any one please light my path ???
I want to change the value of mybb_posts > Structure > AUTO_INCREMENT it's give me error
Error
SQL query:
ALTER TABLE `mybb_posts` CHANGE `pid` `pid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT
MySQL said:
#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key
but in original mybb_posts > Structure > AUTO_INCREMENT it's fine can any one explain what i should do ??
screen shoot
ok let me explain what did i actually do
To remove duplicate post i write a sql query
CREATE TABLE mybb_postsx as
SELECT * FROM mybb_posts WHERE 1 GROUP BY subject;
all duplicate post was remove but the thread was there so i write down again this
CREATE TABLE mybb_threadsx as
SELECT * FROM mybb_threads WHERE 1 GROUP BY subject;
the thread also removed then i run Recount & Rebuild every think become perfect but when i post something it's show the thread name but there was no post created i have look in to the database the post have submitted and saved but the PID and TID was 0 .. i look back to the old table and the value settings i found the AUTO_INCREMENT disabled on my new table .. can any one please light my path ???