PHP/MYSQL Delete data when expire -


i have custom classifieds website, , in mysql have date_created , date_expire. want make script delete ads when expired. mysql table called: "ads" , has these columns: "id" "name" "email" "ad_headline" "date_created" "data_expirare" (this date when ad expire)

here i've tried: http://pastebin.com/gd56bawy

what you'd want run cron job every day or (0 0 * * *). you'd create php file in case, within it, run following query:

delete ads data_expirare < now(); 

Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -