Styling images coming from another blog

Calling image_resize() would be difficult, since it would search for the image in your main blog’s upload directory. If it is a fixed image size I would just add it to the configuration of your photoblog, so it is created there when you upload new images (you can then rebuild your old image thumbnails).

In Mike’s answer you see that he adds the <img src="https://wordpress.stackexchange.com/questions/6873/ and "/> parts in the SQL query. That’s nice, but you don’t have to do that. If you leave that off you get just the URL of the image and you can add everything later in PHP. I wrote an alternative version that will provide you with more raw information to play with.

$attachment_data_list = $wpdb->get_results( $sql );
if ( $attachment_data_list ) {
    foreach ( $attachment_data_list as $attachment_data ) {
        echo '<img src="https://wordpress.stackexchange.com/mysubblog/wp-content/uploads/";
        echo $attachment_data->upload_relative_path;
        echo '"/>';
    }
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)