RE: [PHP] MySQL AUTO INCREMENT feature
| From: | Maxim Maletsky | Date: | Thu, 14 Dec 2000 05:29:33 +0000 |
| Subject: | RE: [PHP] MySQL AUTO INCREMENT feature | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-30250@lists.php.net to get a copy of this message | ||
Just came to my mind... will this work?
you remove the column only and then re-add it back again with an
auto_increment property in it...
will it become 1,2,3,4,5,6 ... ?
I am not really sure... never tried that.
Cheers,
Maxim Maletsky
-----Original Message-----
From: Maxim Maletsky
Sent: Thursday, December 14, 2000 2:25 PM
To: 'Scott Mebberson'; php-general@lists.php.net
Subject: RE: [PHP] MySQL AUTO INCREMENT feature
dunno, but you could always put a sript in cron that gets row by row and
inserts them in a different table, wqhen done renames the original table
adding "_backup" to it's name and then name the new table as was the
original one called.
Unless there's a simplier way to do that.
Cheers,
--max
-----Original Message-----
From: Scott Mebberson [mailto:scott@redbluedesign.com]
Sent: Thursday, December 14, 2000 2:25 PM
To: php-general@lists.php.net
Subject: [PHP] MySQL AUTO INCREMENT feature
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net