Jump to content

Recommended Posts

Hi,

when my command deletes a record. All columns are deleted perfectly, but the primary key is set to 0 instead of being deleted and that causes a lot of gaps in the table.

I am using a command like this:
[code]
DELETE FROM PersonalDetails WHERE UserID = id;
[/code]

When I use the same command on mysql console, it works perfectly! But it doesn't work as good from my application.


Is there any way I can delete it totally?

Any help will be very much appreciated.

Bee
Link to comment
https://forums.phpfreaks.com/topic/3902-delete-record-problem/
Share on other sites

Say what? Unless you're using InnoDB tables, UIDs for AUTO_INCREMENT columns are not re-used unless you explicitly specify a UID to use or reset the increment counter meta-variable. Of course, I've said it once, and I'll say it again: "gaps in the table" doesn't make a lick of difference to anyone. Leave it be.

BTW, I have no idea what you are describing from the console.
Link to comment
https://forums.phpfreaks.com/topic/3902-delete-record-problem/#findComment-13562
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.