VERİTABANI

ŞUAN OLAN DURUM

bu şekilde yapmak istiyorum photoshopdan basite yapıldı anlatılmak istenen resimlerin tabloda alt alta sıralanması sadece o ürünün resimleri bu sıraya gecicek

<table id="datatable1" class="table table-striped dt-responsive nowrap table-hover">
<thead>
<tr>
<th class="text-left">
<strong>Resim 1</strong>
</th>
<th class="text-left">
<strong>Resim 2</strong>
</th>
<th class="text-left">
<strong>Resim 3</strong>
</th>
</tr>
</thead>
<tbody>
<?php
$resimsor=$db->prepare("SELECT * from resim where resim_urun=:resim_id");
$resimsor->execute(array(
'resim_id' => $urunwrite['urun_id']
));
$say=$resimsor->rowCount();
while ($resimcek=$resimsor->fetch(PDO::FETCH_ASSOC)) {
if ($say=='0') { ?>
<?php } else { ?>
<td><a href="#" data-toggle="modal" data-target="#textModal<?php echo $resimcek['resim_id']; ?>"><img style="max-width: 400px; max-height: 1000px;" src="<?php echo $resimcek['resim_link']; ?>" alt=""></a></td>
<div class="modal fade bs-example-modal-lg" id="textModal<?php echo $resimcek['resim_id']; ?>" tabindex="-1" role="dialog" aria-labelledby="textModal">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-body">
<p>
<img style="max-width: 99%; max-height: 900px;" src="<?php echo $resimcek['resim_link']; ?>">
</p>
</div>
</div>
</div>
</div>
<?php } } ?>
</tbody>
</table>