panther786 - I'm not entirely sure I understand your question, but I'll try to give you an answer.
It looks like you're trying to not delete a record if the day is within two days of the current date. Assuming that is the case, you just need to calculate the time difference between the record being deleted and the current time. To do so, you can just implement a time_difference function and check out the value to see if it is less then a certain amount. See the php time function page and search for difference. As the other poster said, you can also do this in SQL, but I didn't know if you had a reason for not wanting to do it that way.
__________________
Plugin-Developer.com - Custom plugin development to fit your needs. Plugins available for WordPress and Drupal, among others.
|