MySQL Primary key gap


Posted on 16th Feb 2014 07:03 pm by admin

Alright, so I have a table with 26 entries in it (id, filename, caption) for my image randomiser (http://zeroerror.co.uk/community_img.php) which is working fine, technically, but I have a slight problem.
The primary key (id) is set to AUTO_INCREMENT and I have recently deleted a row, so it counts 1, 2, 3, 4, 5, 6, 8, 9, etc.
I'd like to know the easiest method of fixing this, which I can build into the deletion script I have written for the administration panel.

Did you know?Explore Trending and Topic pages for more stories like this.
Any thoughts?
Thanks
No comments posted yet

Your Answer:

Login to answer
295 Like 21 Dislike
Previous forums Next forums
Other forums

Date Question
I'm using the TIMESTAMP() function within mysql to set the date/time for certain events. However, ho

Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spa

How to calculate days from variable date?
This will be easy for one of you gurus. I want to fetch the date from a variable date, for example:<

Cannot Display Array from Select Statement + Login question
Hi,
I'm new to PHP but so far so goog. I was assigend a project and I'm very close to completion.

Mass activity scheduling
Hi experts,

Im facing some problems to deal with mass activity jobs.
When I run some

parse error
Parse error: syntax error, unexpected '[', expecting ')' in /Users/admin/Sites/phptest/array.php on

mySQL and PHP search
Hello,
I am trying to code a project and ran into a brick wall with one of my pages. I am pretty

animation progress while uploading files?
Hello, i have some website form to upload few files to server. i want to put some gif animation whi

Why use interfaces in PHP (OOP)
I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't unders

Alternate messaging
I have 4 strings in MySQL db1

$string1 : Hello
$string2 : Hi
$string3 : Great
$strin

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash