Re: [PHP-DB] MySQL compacting

2001-02-12 Thread JJeffman

I'm afraid there is no articles on this matter. You are facing a database
design matter.

Auto-increment primary keys must haven't any meaning other than just be the
primary key and relate one table to another, if you had a function to
"update" the auto-increment field to eliminate the holes that function
should manage tables relationships as well. As you can see it'll be very
difficult to implement and probably slows down the script, imagine check all
related tables !

Although you have holes in the sequence, the order between the reminiscent
records will be the same .

Auto-increment fields should not be exposed to the user.

HTH.

Jayme.

http://www.conex.com.br/jjeffman





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] MySQL compacting

2001-02-11 Thread Rock Kake

Is there any way to add/delete from a MySQL database using PHP3/4 without
leaving blank records?

e.g. if record number 3 is deleted and there are 5 records in the database,
and you have auto-increment as true,

if you add a record it will go in as 6.

Either the database should be compacted so that the record numbers are
shifted down, or the database should intelligently fill the gap where the
old record is.

Are there any good articles that deal with this topic specifically?


--
Rock Kake
--



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]