Thank you,
Well, I could understand what you want.
We can not be realized by shortcode, so we should be addressed by script of php.
For example is as follows:
global $cdbt;
$images = $cdbt->get_data( 'my_images_table', 'ID,image_url' );
$data = $cdbt->get_data( 'my_properties_table', '*' );
$outer_table = '<table class="table table-bordered"><thead><tr><th>Column1</th><th>Column2</th></tr></thead><tbody>';
foreach ($images as $value) {
$outer_table .= sprintf('<tr><td><img src="%s" width="128"></td>', $value->image_url);
foreach ($data as $datum) {
if ($datum->ID === $value->ID) {
$inner_table = '<table>';
foreach ($datum as $k => $v) {
$inner_table .= sprintf( '<tr><th>%s</th><td class="text-left">%s</td></tr>', $k, $v );
}
$inner_table .= '</table>';
break;
}
}
$outer_table .= isset($inner_table) ? sprintf('<td>%s</td></tr>', $inner_table) : '<td>no data</td></tr>';
unset($inner_table);
}
$outer_table .= '</tbody></table>';
echo $outer_table;
Screenshot image of the result that has run the above code is here.
https://ka2.org/assets/2015/06/example_image.png
How about this?