Kód: Vybrať všetko
while (
$hraci_podla_win = mysql_query ("SELECT * FROM user ORDER BY win DESC LIMIT $start , $per_page");
$hraci_pw=mysql_fetch_assoc($hraci_podla_win)) {
$menoh = $hraci_pw ['meno'];
$menok = $hraci_pw ['hrac'];
$win = $hraci_pw ['win'];
$i++;
echo "<tr><td>$i</td><td>$menoh</td><td>$menok</td><td>$win</td></tr>";
echo "</div>";
}Kód: Vybrať všetko
$start = $_GET['start'];
$record_count = mysql_num_rows(mysql_query("SELECT * FROM user"));
$max_pages = $record_count / $per_page;
$prev = $start - $per_page ;
$next = $start + $per_page;
if (!($start <=0)) {
echo "<a href ='tab.php?start=$prev'>Prev</a>";
}
if (! ($start >= $record_count - $per_page) ) {
echo " <a href= 'tab.php?start=$next'>Next</a>";
}