Jump to content

What is the popular way to 'delete' records?


coupe-r

Recommended Posts

Hi all,

 

I'm just wondering how everyone deletes their records using PHP or if you can give me any recommendations.

 

Not really deleting, but I use UPDATE and change the deleteStatus column value. 

 

What is the best / recommended way, with a customer confirmation?

Link to comment
Share on other sites

Whether you actually delete the data, move it off into a separate (eg, backup) table, or just flag it as "deleted" depends on the business.

 

If you need to send a confirmation then you should probably use a flag. If uncontested, you can have a periodic backup routine move the "deleted" data someplace else - for archival purposes.

Link to comment
Share on other sites

Thanks for the reply.

 

Currently I use a deleteStatus flag along with a JS confirmation box.  But, I just had a friend test it out and when they click my delete icons, it just runs the PHP code and never pops up a message.  I'm looking for a way around that.

 

I can post my short PHP and JS code if you want, but didn't want to post JS in here since its the PHP forum

Link to comment
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.