Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Date: Sat, 08 Jun 2013 17:46:19 +0200 From: Luuk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 Newsgroups: comp.lang.php Subject: Re: deleted primary key can't be reused? References: <1riuk3ca2113p$.1butqaatdq7hw.dlg@40tude.net> In-Reply-To: <1riuk3ca2113p$.1butqaatdq7hw.dlg@40tude.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <970c8a-0cn.ln1@luuk.invalid.lan> Lines: 18 NNTP-Posting-Host: 2001:980:9089:1:b1ba:2907:5d1c:8fd6 X-Trace: 1370706601 news.xs4all.nl 15968 [2001:980:9089:1:b1ba:2907:5d1c:8fd6]:40684 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.php:9780 On 08-06-2013 16:24, richard wrote: > Entered 100 items into 2 columns each. > Deleted 2. > Upon entering new record using id of 98, no can do. > The next new record number becomes 101. > "Duplicate key error" is issued. > How do I take back the deleted key number so I can use it again? > No, I do not mean the data that is in the record. > To me, once a record is deleted, the key index should reflect that the > record no longer exists, so the key index should be -1 of what it was. > Not continue its esistance. > while this seems to be a mysql question, It would be better to post the output of show create table An index that is set to 'auto_increment' is always auto-incremented...