I took data from a wp_posts table and now I need to get data from the wp_postmeta table that matches < strong> ID tag captured in the wp_posts table. This data is the product_img1 , product_img2 , product_img3 > as shown in the image below:
TheSQLthatIusedtocapturethewp_postsinformationisthis:
<?phprequire("configs/conxao.php");
$conectado = $pdo->query("SELECT * FROM wp_posts WHERE post_type = 'wpcproduct'");
$conectado->execute();
while($produtos = $conectado->fetch(PDO::FETCH_ASSOC)){
echo $produtos["ID"]."<br>";
echo $produtos["post_title"]."<br>";
}
?>
Can you help me finish this SQL?