Web Hosting Forums

Results 1 to 3 of 3

This is a discussion on MySQL, PostNuke: How do I reset auto_increment in the Hosting Talk & Chit-chat forum
Hi, I installed PostNuke and evrything was working OK. Untill I messed around with the database... There is a field: pn_sid, within table: nuke_stories, that ...

  1. #1
    Loyal Client
    Join Date
    Mar 2002
    Posts
    5

    MySQL, PostNuke: How do I reset auto_increment

    Hi,

    I installed PostNuke and evrything was working OK.

    Untill I messed around with the database...

    There is a field: pn_sid, within table: nuke_stories, that is an Integer which is set to auto_increment.

    This field affects the order the stories are displayed and I was trying to change their order by manually modifying the field. In one instance I even set the field to a negative number.

    Since then, if I try to add a new story, the value this field recievs is: 2147483647, and if I try to add a new story after that I am informed that a story already exists with the requested ID number. In other words it would seem that the ID number has reached it's limit.

    I need to find a way to fix or reset this field.

    Can anyone help?

    Thanx,

    Hillel Barak

  2. #2
    04 LeeUmm's Avatar
    Join Date
    Oct 2002
    Location
    Hamilton, Ontario
    Posts
    630
    Go into phpmyadmin

    View the database by clicking the name in the lefthand side.

    Click properties beside the table its in.
    Check off the field your talking about and click the change button.

    Then at the end of the list there's dropdown menu. You should be able to set it to auto_increment
    I believe its called 'extra' or something similar to that. I'm not looking at it right now so I can't say for sure.

    I _think_ that would solve your problem though I'm not 100% sure.
    Nomsane?
    That is all.

  3. #3
    Loyal Client
    Join Date
    Mar 2002
    Posts
    5
    Hi,

    I have checked the database with PhpAdmin and indeed the field containts the parameter "extra" but it is currently set to "auto_increment ".

    The problem is that somewhere in the database there is a an entry defining the next number to be returned from the "auto_increment" function. This entry is messed up and I need to find a way to reset it to normal.

    Any ideas???

    Hillel

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •