di saat saya klik tombol show all yg mengarah ke script list.php,tidak ada muncul eror,langsung menampilkan tabel kosong ( tampilannya seperti tidak ada file di database)tak satu pun file muncul,kemarin saya sudah coba memberikan limit di dalam script saya sebesar 2600,krna berhubung jumlah file keseluruhan di dlm database saya itu sekitar 2600 lbih file,hasilnya itu berhasil menampilkan semua file yg ada di dlm database,dan saya juga coba memberikan limit di atas 2600,itu tidak berhasil,tetap tidak bisa menampilkan satu pun file,,,
ini saya kirim kan mas script saya,tolong di cek ya mas,,,
show.php
<?php
include 'cek.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Menampilkan Data</title></head>
<tr>
<td><?php include('frame.php'); ?></td>
</tr>
<body BGCOLOR="#90EE90" TEXT="purple">
<?php
$conn = mysql_connect('localhost', 'root', 'admin');
mysql_select_db('dbname');
$username = $_SESSION['username'];
echo "<h2 align='center'> Daftar File Anda </h2>";
// jumlah data yang akan ditampilkan per halaman
$dataPerPage = 30;
// apabila $_GET['page'] sudah didefinisikan, gunakan nomor halaman tersebut,
// sedangkan apabila belum, nomor halamannya 1.
if(isset($_GET['page']))
{
$noPage = $_GET['page'];
}
else $noPage = 1;
// perhitungan offset
$offset = ($noPage - 1) * $dataPerPage;
mysql_connect("localhost","root","amin");
mysql_select_db("dbname");
$warnaGenap = "#CCCCCC"; // warna abu-abu
$warnaGanjil = "#FFFFFF"; // warna putih
$warnaHeading = "#FF0000"; // warna merah untuk heading tabel
// query SQL untuk menampilkan data perhalaman sesuai offset
$query = "SELECT * FROM upload where username = '$username' LIMIT $offset, $dataPerPage";
$result = mysql_query($query) or die('Error');
// menampilkan data
echo '<table border="1" cellpadding="3" cellspacing="4">';
echo "<tr bgcolor='".$warnaHeading."'>";
echo '<align="center">';
echo '<td align="center"><B>ID</a></B></td>';
echo "<td align='center'><B>Keterangan</a></B></td>";
echo "<td align='center'><B>Tanggal</a></B></td>";
echo "<td align='center'><B>Bagian</a></B></td>";
echo "<td align='center'><B>Data Arsip</a></B></td>";
echo '<td colspan="2" align="center"><B>Action</a></td></B>';
echo "</tr>";
$counter = 1;
$conn=mysql_connect("localhost", "root", "admin");
mysql_select_db("dbname");
$sql="select * from upload";
$hasil=mysql_query($sql);
while($data = mysql_fetch_array($result))
{
// cek apakah counternya ganjil atau genap
if ($counter % 2 == 0) $warna = $warnaGenap;
else $warna = $warnaGanjil;
echo "<tr bgcolor='".$warna."'>";
echo "<td align='center'><B>".$data['id']."<B></td>";
echo "<td>".$data['keterangan']."</td>";
echo "<td>".$data['tanggal']."</td>";
echo "<td>".$data['bagian']."</td>";
echo "<td>".$data['name']."</td>";
echo "<td>";
echo "<a href='edit_arsip.php?id=".$data['id']."'> Edit </a>";
echo "</tr>";
$counter++; // menambah counter
}
echo "</table>";
// mencari jumlah semua data dalam tabel guestbook
$query = "SELECT COUNT(*) AS jumData FROM upload WHERE username = '$username'";
$hasil = mysql_query($query);
$data = mysql_fetch_array($hasil);
$jumData = $data['jumData'];
// menentukan jumlah halaman yang muncul berdasarkan jumlah semua data
$jumPage = ceil($jumData/$dataPerPage);
// menampilkan link previous
echo 'Halaman : ';
if ($noPage > 1) echo "<a href='".$_SERVER['PHP_SELF']."?page=".($noPage-1)."'><< Prev</a>";
// memunculkan nomor halaman dan linknya
for($page = 1; $page <= $jumPage; $page++)
{
if ((($page >= $noPage - 3) && ($page <= $noPage + 3)) || ($page == 1) || ($page == $jumPage))
{
if (($showPage == 1) && ($page != 2)) echo "...";
if (($showPage != ($jumPage - 1)) && ($page == $jumPage)) echo "...";
if ($page == $noPage) echo " <b>".$page."</b> ";
else echo " <a href='".$_SERVER['PHP_SELF']."?page=".$page."'>".$page."</a> ";
$showPage = $page;
}
}
// menampilkan link next
if ($noPage < $jumPage) echo "<a href='".$_SERVER['PHP_SELF']."?page=".($noPage+1)."'>Next >></a>";
echo "<a href='list.php?id=".$data['id']."'> Show All </a>";
?>
<br>
<br>
<tr>
<td><?php include('footer.php'); ?></td>
</tr>
ini script untuk list.php nya ( yang menampilkan keseluruhan file yg ada dlm database)
<?php
include 'cek.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Menampilkan Data</title></head>
<tr>
<td><?php include('frame.php'); ?></td>
</tr>
<body BGCOLOR="#90EE90" TEXT="purple"font size="10">
<?php
mysql_connect("localhost","root","admin");
mysql_select_db("dbname");
$username = $_SESSION['username'];
echo "<h2 align='center'> Daftar File Anda </h2>";
$warnaGenap = "#CCCCCC"; // warna abu-abu
$warnaGanjil = "#FFFFFF"; // warna putih
$warnaHeading = "#FF0000"; // warna merah untuk heading tabel
$query = "SELECT * FROM upload WHERE username = '$username' limit 2650";
$hasil = mysql_query($query);
echo '<table border="1" cellpadding="3" cellspacing="4">';
echo "<tr bgcolor='".$warnaHeading."'>";
echo '<td align="center"><B>ID</B></td>';
echo "<td align='center'><B>Keterangan</B></td>";
echo "<td align='center'><B>Tanggal</B></td>";
echo "<td align='center'><B>Bagian</B></td>";
echo "<td align='center'><B>Data Arsip</B></td>";
echo '<td colspan="2" align="center"><B>Action</td></B>';
echo "</tr>";
$counter = 1;
$conn=mysql_connect("localhost", "root", "admin");
mysql_select_db("dbname");
$sql="select * from upload WHERE username = '$username'";
$hasil=mysql_query($sql);
while($data = mysql_fetch_array($hasil))
{
// cek apakah counternya ganjil atau genap
if ($counter % 2 == 0) $warna = $warnaGenap;
else $warna = $warnaGanjil;
echo "<tr bgcolor='".$warna."'>";
echo "<td align='center'><B>".$data['id']."</B></td>";
echo "<td>".$data['keterangan']."</td>";
echo "<td>".$data['tanggal']."</td>";
echo "<td>".$data['bagian']."</td>";
echo "<td>".$data['name']."</td>";
echo "<td>";
echo "<a href='edit_arsip.php?id=".$data['id']."'> Edit </a>";
echo "</tr>";
$counter++; // menambah counter
}
echo "</table>";
?>
<br>
<br>
<tr>
<td><?php include('footer.php'); ?></td>
</tr>
mohon yach mas bantuan nya