|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
Restoring a database, (using big dump) I get this error... Error at the line 25131: INSERT INTO `ubbt_FORUM_LAST_VISIT` (`FORUM_ID`, `USER_ID`, `LAST_VISIT_TIME`) VALUES(2, 2, 1291404700);
Query: INSERT INTO `ubbt_FORUM_LAST_VISIT` (`FORUM_ID`, `USER_ID`, `LAST_VISIT_TIME`) VALUES(2, 2, 1291404700);
MySQL: Duplicate entry '2-2' for key 1 Can anyone shed a little light on this please?
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
Tried three times now - also dropped the tables and started from fresh - same problem.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Hmm, it looks like somehow there is a duplicate entry for USER_ID 2 on FORUM 2. Not sure how that would happen.
The only way around that would probably be to edit the dump file and remove the entry (or just remove all of the data for the FORUM_LAST_VIST table).
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
Ugh - I was dreading that answer, but thought it may be the case. ok - thanks for that BTW - what would be the effect of the second option?
Last edited by driv; 12/06/2010 10:51 AM. Reason: second option?
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
Well, I deleted that line - even though it turned out to be unique. Re-uploaded (takes forever via ftp) then I get this... Error at the line 25131: INSERT INTO `ubbt_FORUM_LAST_VISIT` (`FORUM_ID`, `USER_ID`, `LAST_VISIT_TIME`) VALUES(16, 2, 1291498230);
Query: INSERT INTO `ubbt_FORUM_LAST_VISIT` (`FORUM_ID`, `USER_ID`, `LAST_VISIT_TIME`) VALUES(16, 2, 1291498230);
MySQL: Duplicate entry '2-16' for key 1 So I guess it's this part... INSERT INTO `ubbt_FORUM_LAST_VISIT` (`FORUM_ID`, `USER_ID`, `LAST_VISIT_TIME`) VALUES(16, 2, Clearly I can't search for all possible duplicates, so I have to go for option 2. Can you please explain what would be affected by the removal of this data? Thanks
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Hmm, that's a bit odd on the dups. Hopefully it turns out to be only that table.
If you remove all of the data, then basically it would just mean that all posts would be marked as unread. So, you'd probably just want to make a post for everyone to use the mark all read button when they login again.
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
ok Thanks.
By any chance, is there a query that would do that automatically?
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
If you're dumping it out first, then you can get rid of all the entries with:
truncate table ubbt_FORUM_LAST_VISIT
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
Sorry, I wasn't clear. Is there a query I could use to mark all users posts as read?
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Ah, unfortunately not since it has to do an entry for every user in every forum.
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
ok, thanks for the help
|
|
|
0 members (),
396
guests, and
159
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|