But instead I end up with the following:
001 user1
003 user3
Any idea or comment?
The auto incrementing feature of mysql unfortunately will always increase by
1 based on the (MAX) primary key ID number. Questions about this have been
made to the MySQL development team as to if they would m
Well, my comment on this is that the autoincrement field is giving you a
primary key which is not changing, and this is good. Check the scripts you
used to build the tables, and your MySQL docs for the MyISAM table type.
When tables are defined as being of the type MyISAM, the autoincrement
nu
HI,
Look into Optimizing the Table..
it seems to clean up the holes.
Ken
- Original Message -
From: "Wilmar Pérez" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 1:50 PM
Subject: [PHP-DB] Authomatic Sorting
> Hello guys
>
> I have the following two
When you delete a record it doesn't affect the other ones, so if you want to
change the other ones you have to update them too.
For this purpose I use the following SQL command after deleting a row:
UPDATE table SET id_field=id_field-1 where id_field>deleted_ID_value
I hope this will help
Dobr
The 'problem' here is the logic of sql databases.
you have one id and one 'username' and they belong to eachother.
id 1 -> user 1
id n -> user n
meaning if you delete user 23, only id 23 is affected. If you want the
userid 'resorted' you will have to issue a few commands (which also would
destro
D you ever create an index on the primary key to speed things up??
ken
- Original Message -
From: "Paul Burney" <[EMAIL PROTECTED]>
To: "Wilmar Pérez" <[EMAIL PROTECTED]>; "PHP List"
<[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 3:18 PM
on 7/4/01 1:50 PM, Wilmar Pérez at [EMAIL PROTECTED] wrote:
> I've got a table with an autoincrement field which is the registry's ID,
> everything goes well until I delete any registry. MySQL doesn't re-sorts
> the information. That is, I have the following:
Just add an "ORDER BY" clause to