Re: MySQL AUTO INCREMENT feature
| From: | Glen Ogilvie | Date: | Thu, 14 Dec 2000 19:38:48 +0000 |
| Subject: | Re: MySQL AUTO INCREMENT feature | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30347@lists.php.net to get a copy of this message | ||
Why do you want to re-evaluate the auto increment?
From my understanding of database structure, using a auto increment column is
usually used for a unique sequence number, so that you can store information
in more than one table and join it to produce the information needed. If you
re-ordered these numbers, it would then not work. If you simply want to
produce a list of items from your table, then why not number then in the
script rather than storing it in your database?
Regards
Glen Ogilvie
On Thursday 14 December 2000 18:24, you wrote:
> Hi Guys,
>
> I am using the AUTO INCREMENT attribute on one of my cols. I need to know
> how I can clean this up. For example, just say I have rows with the
> elementID's of 1, 2, 3, 4, 5, 6, 7, 8 and then I delete 3, 6 and 7.
>
> Is there some command I can call using PHP that will re-eval the elementID
> col to reorder them so it became 1, 2, 3, 4, 5
>
> Thanks
>
> Scott.