sitemde ise aynı üyeleri sürekli tekrarlıyor sadece 2 üyeyi göstersin istiyorum birde 4'den az üye varsa notu olan ( Uye_GununSozu ) auto slider dursun fazla ise çalışsın istiyorum
<?php
$Araclar = $db->query("SELECT Uye_AracResmi, Uye_Plaka, Uye_GununSozu, Uye_Kimlik, Uye_Instagram FROM Uyeler ORDER BY Uye_Kimlik");
while ($Cek = $Araclar->fetch()) {
// Check if the vehicle image exists
if (!empty($Cek['Uye_GununSozu'])) {
echo '<div class="item custom-item" data-toggle="modal" data-target="#vehicleModal' . $Cek['Uye_Kimlik'] . '" data-image="Uyeler/Araclar/' . $Cek['Uye_AracResmi'] . '" data-plaka="' . $Cek['Uye_Plaka'] . '">';
$comment = $Cek['Uye_GununSozu'];
$truncatedComment = strlen($comment) > 5 ? substr($comment, 0, 6) . '...' : $comment;
$truncatedComment = mb_convert_encoding($truncatedComment, 'UTF-8');
echo '<p class="comment-count">' . $truncatedComment . '</p>';
echo '<div class="circle">';
if (!empty($Cek['Uye_AracResmi'])) {
echo '<img class="Araclar" src="Uyeler/Araclar/' . $Cek['Uye_AracResmi'] . '"/>';
} else {
echo '<img class="Araclar" src="dosyalar/' . $ayarcek['Panel_Logo'] . '"/>';
}
echo '<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">';
echo '<circle cx="50" cy="50" r="40" />';
echo '</svg>';
echo '</div>';
echo '<p class="Plaka">' . $Cek['Uye_Plaka'] . '</p>';
echo '</div>';
}
}
?>
</div>
<script>
$(document).ready(function() {
$('#picture-slider').owlCarousel({
loop: true,
margin: 0,
autoplay: true,
autoplayTimeout: 2000,
responsive: {
0: {
items: 4,
margin: 10
},
600: {
items: 8,
margin: 10
},
1000: {
items: 15,
margin: 10
}
}
}).on('changed.owl.carousel', function(event) {
$('.owl-item.active .circle').on('click', function() {
var src = $(this).find('.Araclar').attr('src');
$('#modalImage').attr('src', src);
$('#vehicleModal').modal('show');
});
});
});
</script>