WordPress delete mysql rows with string
Look at the documentation, $wpdb->delete() takes at least two parameters, the table name and the Where-conditions as an array(). LIKE isn’t supported for delete imho, so you’ll need to use ->query global $wpdb; $wpdb->query( “DELETE FROM $wpdb->postmeta WHERE meta_key LIKE ‘_cb_%'” ); $wpdb->query( “DELETE FROM $wpdb->posts WHERE post_type LIKE ‘webcam'” ); I assume the double … Read more