使用php删除数据[关闭]

It's possible create code can delete data in table after specific time given from user using php and pdo or something similar and how i do it?

public function delete_time($thedata,$time){


}

Your question is a bit vague and so my answer must be vague as well, but I believe you can do what you want using the Event Scheduler. You can create a SQL statement to schedule a query (such as a DELETE) to run once or repeatedly at a future time:

CREATE EVENT future_delete
  ON SCHEDULE AT <timestamp>
  DO CALL my_delete_procedure(<param1>, <param2>);

I should imagine you could wrap this in a stored procedure that you could then invoke from php, passing bound values for <timestamp>, <param1>, <param2> &c.

Hope that's of some use to you.