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 is wasted. Perhaps when
they say renumbering what they are meaning is
compacting the database reusing the empty slots
they assume those autoincrement fields point
to. Someone remembers dBaseIII .dbf files?
Well, perhaps that is the picture they have in
mind.
As the person who started the other thread about
this, my big thing was having a continuous
record number that I could display to the
customer much the way excel displays record
numbers.
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
worked. I'm pretty new working with databases,
and PHP. HTML and CSS I've done for awhile, just
never needed a database or programming language
until recently :)
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 as tedd suggested, and leave the
main auto increment field alone. OR use PHP (Or
your favorite programming language) to add a
"Record number" to the display.
Okay I'm done now :)
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php