my name is frank, i have been trying to create a cronjob that will be deleting a database table every 12 midnight but i found no help, below is the database table. please any help?
DELETE FROM X51g_myCRED_log WHERE ref = 'link_click'
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
The sql command for dropping a table would be something like:
DROP TABLE IF EXISTS X51g_myCRED_log
That would drop (delete) the table 'X51g_myCRED_log'.
You can accomplish this with WP CLI:
wp db query "DROP TABLE IF EXISTS X51g_myCRED_log".
Be careful, I havent tested this, but this should point you in the right direction