PHP & PDO Page Lists
I wrote the php and pdo page listing system but it isn't working. I wrote
some codes with pdo and php. But I understand to problem? Where is the
problem?
Code:
<?php
$sorgu = $baglan->prepare('SELECT * FROM `uye` ORDER BY `uye_id`');
$sorgu->execute();
$ksayisi = $sorgu->rowCount();
$limit = 10;
$ssayisi = ceil($ksayisi/$limit);
$baslangic = ($sayfa * $limit) - $limit;
$sorgu = $baglan->prepare('SELECT * FROM `uye` ORDER BY `uye_id` DESC
LIMIT $baslangic, $limit');
$sorgu->execute();
if($sorgu->rowCount() > 0){
while ($uyebilgi = $sorgu->fetch()){
?>
<tr>
<td><?php echo $uyebilgi['uye_id']; ?></td>
<td><?php echo $uyebilgi['uye_adi']; ?></td>
<td><?php echo $uyebilgi['uye_tarih']; ?></td>
<td>
<a href="user.html"><i class="icon-pencil"></i></a>
<a href="#myModal" role="button" data-toggle="modal"><i
class="icon-remove"></i></a>
</td>
</tr>
<?php }} ?>
Where is the problem?
No comments:
Post a Comment