When the authentication code in the Tuser is not null it means the users didnt login the site within 24 hours so i have to delete the rows.
Here is the query which I wrote but it is not deleting correctly
DELETE FROM tusers WHERE auth_code IS NOT NULL
AND auth_code !=''
AND STR_TO_DATE(NOW(),'%Y-%m-%d %T')
> (DATE_SUB(STR_TO_DATE(created_date,'%Y-%m-%d %T'),INTERVAL -1 DAY))
I got the perfect delete which is working perfectly:
This query deletes the rows by comparing the current date of the system with the created date of the rows which reaches above 24 hours of the current date.