I need to use trigger for one of my database this is offer data table
CREATE TABLE IF NOT EXISTS offer_detail ( id int(60) NOT NULL AUTO_INCREMENT,
company_id int(60) NOT NULL,
offertype_id int(60) NOT NULL,
category_id int(60) NOT NULL,
place_id int(100) NOT NULL,
offer_title varchar(150) NOT NULL,
offer_description text NOT NULL,
image varchar(150) NOT NULL,
coupon_id varchar(60) NOT NULL,
price text NOT NULL,
unit_id varchar(60) NOT NULL,
price_now varchar(60) NOT NULL,
offer_from varchar(80) NOT NULL,
<big></big>offer_to varchar(80) NOT NULL,
user_id int(10) NOT NULL,
created varchar(11) NOT NULL,
modified varchar(10) NOT NULL,
Active varchar(100) NOT NULL,
PRIMARY KEY (id),
i get offer duration using
offer_from TO
offer_to
i need delete offer detail from datatable if offer_to less than currectdate
like this
DELETE FROM Offer_detail WHERE offer_to< NOW()
i need do this Automatically how do this