Aqui está o código que usei no vídeo:
<?php
include('../wp-load.php');
global $wpdb;
$sql = "SELECT id, type, form_name
FROM {$wpdb->prefix}e_submissions";
$query = $wpdb->get_results($sql);
//var_dump($query);
foreach($query as $key=>$value){
echo '<div>' .$value->id .' | '. $value->form_name . '</div>';
$sql2 = "SELECT * FROM {$wpdb->prefix}e_submissions_values
WHERE submission_id=". $value->id;
$query2 = $wpdb->get_results($sql2);
//echo $sql2;
foreach($query2 as $k=>$v){
echo '<div>' .$v->key .': '. $v->value . '</div>';
}
echo '<hr>';
}
Adquira o Elementor PRO: