mysql query .. please help me
-
hi.
—————————————————————–
function deleteNoMatchPosts(){
global $wpdb;
$wpdb->query(“DELETE FROM $wpdb->posts WHERE post_title NOT LIKE ‘%favourite%’ “);
$wpdb->query(“DELETE FROM $wpdb->posts WHERE post_title NOT LIKE ‘%favourite1%’ “);
$wpdb->query(“DELETE FROM $wpdb->posts WHERE post_title NOT LIKE ‘%favourite2%’ “);
}add_action(‘save_post’, ‘deleteNoMatchPosts’);
—————————————————————–
i write that code to delete post title that not match certain string.
but before do DELETE FROM blabla..
i want to select only post_title that are created past certain date say May 1 2009.
please help. thanks
- The topic ‘mysql query .. please help me’ is closed to new replies.