Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
4 registered (Dunny, id242, KuKuKaChu, FordDoctor), 54 Guests and 14 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 05/13/08
Posts: 596
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 14
SteveS 14
AllenAyres 12
dbremer 10
SD 10
drkknght00 9
driv 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Topic Options
#188192 - 06/22/07 03:18 PM Adding Post Error
ncdeer Offline
stranger
Registered: 02/13/07
Posts: 9
I am getting duplicate key error when I try to add a new post. Any idea where the Key gets generated so I can change the value?

Copy of the error.

Script: /usr/local/www/vhosts/ncdeer.com/htdocs/ncdeerfourm/scripts/addpost.inc.php
Line#: 470
SQL Error: Duplicate entry '193310' for key 1
SQL Error #: 1062
Query: INSERT INTO ubbt_POSTS (POST_PARENT_ID,TOPIC_ID,POST_IS_TOPIC,POST_POSTED_TIME,POST_POSTER_IP,POST_SUBJECT,POST_BODY,POST_DEFAULT_BODY,POST_IS_APPROVED,POST_ICON,POST_HAS_POLL,POST_HAS_FILE,POST_MARKUP_TYPE,USER_ID,POST_PARENT_USER_ID,POST_ADD_SIGNATURE,POST_LAST_EDITED_TIME) VALUES ( 0 , 17627 , 1 , 1182525335 , '199.82.243.71' , 'Test Post' , 'I am attempting to create a new entry after the restart.' , 'I am attempting to create a new entry after the restart.' , 1 , 'book.gif' , 0 , 0 , 'markup' , 3 , 0 , 1 , 0 )

Please use your back button to return to the previous page.
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#188195 - 06/22/07 03:24 PM Re: Adding Post Error [Re: ncdeer]
ntdoc Offline
Registered: 11/09/06
Posts: 3384
I've seen this before but don't recall the exact fix. Basically that post already exists. As I recall it was something to do with our import from an upgrade. You can manually go into the database and remove that entry but that might not be the real fix.

What version of PHP, MySQL, and UBBT are you running?
Top
#188197 - 06/22/07 03:27 PM Re: Adding Post Error [Re: ntdoc]
Mark S Offline
Carpal Tunnel
Registered: 07/04/06
Posts: 4447
Loc: Liverpool : England : UK
yeh i just done a search no luck \:\(
_________________________
Version v7.5.6 smile smile < Threads satisfaction status
People who inspire me Rick Gizmo Ian David jgeoff ntdoc
Oooo i hear 8 is coming? just after 7 my friend.
Top
#188201 - 06/22/07 03:33 PM Re: Adding Post Error [Re: Mark S]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
Sounds like your auto_increment field is a bit out of sync. Try running this MySQL query:

repair table ubbt_POSTS
Top
#188203 - 06/22/07 03:33 PM Re: Adding Post Error [Re: Mark S]
ncdeer Offline
stranger
Registered: 02/13/07
Posts: 9
ubbt 7.0.2 php version 4.3.10 and version 4.1 of mysql

When I do a query of the table the max POST_ID on the table I
get 193309 so it looks as if the auto increment is working. Not sure what the problem could be.
Top
#188204 - 06/22/07 03:34 PM Re: Adding Post Error [Re: ncdeer]
ncdeer Offline
stranger
Registered: 02/13/07
Posts: 9
running the repair now
Top
#188212 - 06/22/07 03:47 PM Re: Adding Post Error [Re: ncdeer]
ncdeer Offline
stranger
Registered: 02/13/07
Posts: 9
That seem to fix the problem. Thanks, I probably should run it on all the tables to insure they are ok
Top
#188290 - 06/22/07 06:53 PM Re: Adding Post Error [Re: ncdeer]
Gizmo Offline

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
the "analyze" command will be much faster than "repair" and will actually tell you if there is problems.
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10489 Members
36 Forums
33841 Topics
181707 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image