WordPress.org

Ready to get started?Download WordPress

Forums

Cache Images
Extracting images from post_meta (1 post)

  1. James.v
    Member
    Posted 2 years ago #

    We have a MySQL database where the image urls are stored in the post_meta tables rather than the posts table.

    We have tried amending the plugin but haven't been able to get it to work.

    here is the original code:

    $postid_list = $wpdb->get_results("SELECT DISTINCT ID FROM $wpdb->posts WHERE post_content LIKE ('%<img%') AND post_content LIKE ('%$domain%')");

    Our code:

    $postid_list = "
    SELECT $wpdb->posts.* FROM $wpdb->posts, $wpdb->postmeta WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id AND $wpdb->postmeta.meta_key = 'image' AND $wpdb->postmeta.meta_value LIKE ('%jpg%') ";

    Has anybody got any better ideas than this?

    http://wordpress.org/extend/plugins/cache-images/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic