title: how to display product image from wordpress database
body: <p>I want to display woocommerce product image from wordpress mysql database. for example, if a product has id 11 and its image, attribute, price etc are stored in wp-postmeta table in the database. The image is stored in someother id and the id value is given in image of the product 10. Now how to fetch image from the table.</p>
  
  <p>for single product,</p>
  
  <pre><code>    $img = mysql_query("SELECT meta_value FROM wp_postmeta WHERE meta_key ='_thumbnail_id' AND post_id='11'",$con);
      $res= mysql_fetch_array($img);
      $img2 = mysql_query("SELECT meta_value FROM wp_postmeta WHERE meta_key ='_wp_attached_file' AND post_id='".$res['meta_value']."'",$con);
      $res2= mysql_fetch_array($img2);
      echo $res2['metavalue'];
  </code></pre>
  
  <p>displays the image of single product, but how to fetch data from mysql database for multiple products?</p>