$wpdb DELETE SQL from root
I'm trying to delete transients from the db each day using a cron. I currently have this in a file in the root of my site: <?php include_once("wp-load.php"); global $wpdb; $wpdb->show_errors(); $wpdb->query("DELETE FROM `".$wpdb->prefix."options` WHERE `option_name` LIKE ('_transient_%')"); $wpdb->print_error(); ?> It does nothing and prints out this: WordPress database error: [] DELETE FROM 123_options WHERE option_name LIKE ('transient%') Any pointers?
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.