Basically, am creating a mailer system to send a mail to my inactive members to do activities in their account if they have not logged in since 30 days.
My previous login date stores in my database in unixtimestamp hence i coded as below.
select email from myusers where WHERE DATE_ADD(FROM_UNIXTIME(prelogin), INTERVAL 30 DAY) < CURDATE()";
But this code after 30 days it is sending continuos mails almost everyday as i have set cron to run once a day
Can someone help please