Help - Search - Members - Calendar
Full Version: EntryID is 2147483647
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
detx42
I am writing a program that sorts the entries by id. The Entries themselves are sorted 6 times before they get posted to MT. At times, when I put up new posts, I want to change the entry-id of a post to a lower number so it appears in the proper spot in the blog.

The problem with the floating point ID# arose when I assigned a post an id of -1 temporarily before changing it back to a proper number. Since I was still testing the program it would occasionally crash, leaving -1 for the id. I would then manually go into the MT database and change -1 to the proper id. However, when I run the script next time, it would assign the first post's id as 2147483647 and for every post thereafter, it wouldn't assign a number (probably because 2147483647 is the highest number the variable could go).

My question is where does the program store the id for the next post and how do I change it back to a proper number? huh.gif
RobNovak
I'm assuming you're using a SQL database server.

This SQL command will set your entry id to whatever you choose.

ALTER TABLE `mt_entry` AUTO_INCREMENT = **Next Entry ID Here**

Or, if you are using mySQL and phpMyAdmin, select your database, select the mt_entry table, select the Operations tab, change the auto_increment field under Table Options, and click "GO".
detx42
Ah yes I see that field. Thanks alot that's what I needed.
(Using mySQL with mySQLCC).
RobNovak
No problem. Glad to be of assistance.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.