Jump to content

delete record problem


Bee

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.