Jump to content

Recommended Posts

Posted

Hello.

Would anyone here know how to do delete a row from a MySQL database after a certain date?

so lets say someone puts in 11/12/2012 in a form text-box and is sent to a table in a MySQL database, when the date 11/12/2012 comes, the row in the MySQL database will delete?

Any help will be much appreciated!

Regards,

James

Posted

You'll need a cron job to run the script daily, and the mysql should be something like:

DELETE * FROM table WHERE date <= NOW()

Hopefully...

Posted

You'll need a cron job to run the script daily, and the mysql should be something like:

DELETE * FROM table WHERE date <= NOW()

Hopefully...

Ok, I shall have a go with that tomorrow.

Thanks Tom :)

  • Moderators
Posted

Indeeded!

Happened to me once when I was creating a TypeRating and I made a mistake for deleting the pilot's typerating, it deleted the pilot. :lol:

Posted

Indeeded!

Happened to me once when I was creating a TypeRating and I made a mistake for deleting the pilot's typerating, it deleted the pilot. :lol:

I don't know why but that just made me laugh laugh.gif

  • Like 1

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.

Loading...
×
×
  • Create New...