Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread Larry Garfield
On Monday 03 September 2007, Steve Finkelstein wrote: How're you folks dealing with records that are auto incremented in MySQL after a delete is made? I've noticed the only way to get a sequential order back is to truncate the table completely. Do you use logic in your code to find a missing

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread Per Jessen
Steve Finkelstein wrote: Do you use logic in your code to find a missing ID and insert new records based on that? Or do you just ignore it, let mysql handle the numbering and go on with your lives? The latter. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread Jay Blanchard
[snip] Do you use logic in your code to find a missing ID and insert new records based on that? Or do you just ignore it, let mysql handle the numbering and go on with your lives? [/snip] The answer is B. There is a long standing discussion on this right now. -- PHP General Mailing List

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread Satyam
-general php-general@lists.php.net Sent: Tuesday, September 04, 2007 12:53 PM Subject: RE: [PHP] Dealing with auto-increment in MySQL [snip] Do you use logic in your code to find a missing ID and insert new records based on that? Or do you just ignore it, let mysql handle the numbering and go

RE: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread Jay Blanchard
[snip] I was wondering if people is asking this in the belief that the autoincrement field is the record position in the database table and that by not reusing those positions, the space of the deleted records is wasted. Perhaps when they say renumbering what they are meaning is compacting the

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread tedd
At 1:15 PM +0200 9/4/07, Satyam wrote: I was wondering if people is asking this in the belief that the autoincrement field is the record position in the database table and that by not reusing those positions, the space of the deleted records is wasted. Perhaps when they say renumbering what

RE: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread Bastien Koert
I just let it go...there is no need to manage that process or you'll just screw up the mysql... it shouldn't be relied on for anything other that uniqueness any way bastien Date: Mon, 3 Sep 2007 23:53:22 -0400 From: [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP]

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread Jason Pruim
On Sep 4, 2007, at 7:15 AM, Satyam wrote: I was wondering if people is asking this in the belief that the autoincrement field is the record position in the database table and that by not reusing those positions, the space of the deleted records is wasted. Perhaps when they say

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread brian
Jason Pruim wrote: As the person who started the other thread about this ... As one of the people responsible for dragging that thread out ... But after discussing it, I see where my thinking was wrong in how I wanted to achieve it, and also my misunderstanding of the way databases

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread Jason Pruim
On Sep 4, 2007, at 12:20 PM, brian wrote: Jason Pruim wrote: As the person who started the other thread about this ... As one of the people responsible for dragging that thread out ... But after discussing it, I see where my thinking was wrong in how I wanted to achieve it, and also my

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread brian
Jason Pruim wrote: On Sep 4, 2007, at 12:20 PM, brian wrote: Jason Pruim wrote: so to put my 2¢ in on this, I would say to leave alone the auto increment field especially if it's included in an index. If you need a record number, either store it in the database in a separate field

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread tedd
At 12:08 PM -0400 9/4/07, Jason Pruim wrote: On Sep 4, 2007, at 7:15 AM, Satyam wrote: I was wondering if people is asking this in the belief that the autoincrement field is the record position in the database table and that by not reusing those positions, the space of the deleted records

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread brian
tedd wrote: Jason: Well, at least you read and comprehended what was said -- that's better than some. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com Nice. Good luck with your database endeavours! brian -- PHP General Mailing List

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread tedd
At 8:12 PM -0400 9/4/07, brian wrote: tedd wrote: Jason: Well, at least you read and comprehended what was said -- that's better than some. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com Nice. Good luck with your database endeavours! brian

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-03 Thread Chris
Steve Finkelstein wrote: How're you folks dealing with records that are auto incremented in MySQL after a delete is made? I've noticed the only way to get a sequential order back is to truncate the table completely. Do you use logic in your code to find a missing ID and insert new records based

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-03 Thread Greg Donald
On Mon, Sep 03, 2007 at 11:53:22PM -0400, Steve Finkelstein wrote: How're you folks dealing with records that are auto incremented in MySQL after a delete is made? I've noticed the only way to get a sequential order back is to truncate the table completely. Re-numbering is a bad idea for