Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-28 Thread Tedd Sperling
On Jun 27, 2013, at 8:47 PM, Paul M Foster pa...@quillandmouse.com wrote: On Thu, Jun 27, 2013 at 11:47:28PM +0200, adriano wrote: holes in sequence of auto increment happen using transaction for insert new record but you don't commit transaction itself it seems that the autoincrement is

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-28 Thread Tamara Temple
Tedd Sperling tedd.sperl...@gmail.com wrote: On Jun 27, 2013, at 8:47 PM, Paul M Foster pa...@quillandmouse.com wrote: On Thu, Jun 27, 2013 at 11:47:28PM +0200, adriano wrote: holes in sequence of auto increment happen using transaction for insert new record but you don't commit

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-27 Thread adriano
holes in sequence of auto increment happen using transaction for insert new record but you don't commit transaction itself it seems that the autoincrement is incremented anyway at least this is my case. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-27 Thread Paul M Foster
On Thu, Jun 27, 2013 at 11:47:28PM +0200, adriano wrote: holes in sequence of auto increment happen using transaction for insert new record but you don't commit transaction itself it seems that the autoincrement is incremented anyway at least this is my case. I think what Tedd was

[PHP] Reseting the auto-increment number in a MySQL database.

2013-06-26 Thread Tedd Sperling
Hi gang: I have a client where their next auto-increment number just jumped from 2300 to 10 for reasons not understood. They want it set back. Options such as dropping the primary key and rebuilding the index is NOT possible -- this is a relational table thing. So, is there a way

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-26 Thread Samuel Lopes Grigolato
You can try this: *ALTER TABLE tbl AUTO_INCREMENT = 100;* * * *Source: *http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html (never did it myself, though) On Wed, Jun 26, 2013 at 2:07 PM, Tedd Sperling t...@sperling.com wrote: Hi gang: I have a client where their next

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-26 Thread Stuart Dallas
On Wednesday, 26 June 2013 at 18:07, Tedd Sperling wrote: Hi gang: I have a client where their next auto-increment number just jumped from 2300 to 10 for reasons not understood. They want it set back. Options such as dropping the primary key and rebuilding the index is NOT

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-26 Thread Tedd Sperling
On Jun 26, 2013, at 1:13 PM, Stuart Dallas stu...@3ft9.com wrote: On Wednesday, 26 June 2013 at 18:07, Tedd Sperling wrote: Hi gang: I have a client where their next auto-increment number just jumped from 2300 to 10 for reasons not understood. They want it set back. Options such

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-26 Thread Jim Giner
On 6/26/2013 1:30 PM, Tedd Sperling wrote: On Jun 26, 2013, at 1:13 PM, Stuart Dallas stu...@3ft9.com wrote: On Wednesday, 26 June 2013 at 18:07, Tedd Sperling wrote: Hi gang: I have a client where their next auto-increment number just jumped from 2300 to 10 for reasons not

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-26 Thread Tedd Sperling
On Jun 26, 2013, at 1:32 PM, Jim Giner jim.gi...@albanyhandball.com wrote: But more importantly - don't you need to figure out why it happened?? As well as correcting any inserts with the bogus id? Yes, I would like to know -- I'm open for suggestions. Cheers, tedd _

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-26 Thread Matijn Woudt
On Wed, Jun 26, 2013 at 7:35 PM, Tedd Sperling tedd.sperl...@gmail.comwrote: On Jun 26, 2013, at 1:32 PM, Jim Giner jim.gi...@albanyhandball.com wrote: But more importantly - don't you need to figure out why it happened?? As well as correcting any inserts with the bogus id? Yes, I would

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-26 Thread Jim Lucas
On 06/26/2013 10:07 AM, Tedd Sperling wrote: Hi gang: I have a client where their next auto-increment number just jumped from 2300 to 10 for reasons not understood. They want it set back. Options such as dropping the primary key and rebuilding the index is NOT possible -- this is a

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-26 Thread Tedd Sperling
On Jun 26, 2013, at 3:23 PM, Matijn Woudt tijn...@gmail.com wrote: What storage engine are you using? InnoDB is known for it's auto increment holes, but I didn't expect the holes to be that big. I have no idea. It's not my database. It's Constant Contact's -- I just put stuff in it as per