Re: Question: Correcting MySQL's ID colomn when removing an entry
| From: | Phpster | Date: | Sun, 20 Sep 2009 12:37:58 +0000 |
| Subject: | Re: Question: Correcting MySQL's ID colomn when removing an entry | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298196@lists.php.net to get a copy of this message | ||
On Sep 20, 2009, at 3:37 AM, "Parham Doustdar" <parham90@gmail.com> wrote:
Hello there, I'm guessing that when a row in a MySQL table is removed, the ID colomns of the rows which come after that row are not changed. For example: 1 2 3 4 Now, if I want to remove the third rows, the ID colomn would be something like: 1 2 4 I was wondering if there was a way to fix it through a query, so I wouldn't have to use a for statement in PHP to fix it? Thanks! ----- Contact info: Skype: parham-d MSN: fire_lizard16 at hotmail dot com GoogleTalk: parham90@gmail.com Twitter: PD90 email: parham90 at GMail dot comThe quick answer is you don't. it will cause you far more headaches than it's worth. the id is only for uniqueness and linking should have nothing to do with havin any meaning in the data. Bastien Sent from my iPod