<?php
include("db.inc.php");
$page = $_GET['page'];
$countbedrijven = mysql_query("SELECT * FROM bedrijven");
$count = mysql_num_rows($countbedrijven);
$max = 8;
$nopaginas = $count / $max;
$nopaginas = ceil($nopaginas);
$first = $page * $max - $max;
$last = $page * $max;
$getbedrijven = mysql_query("SELECT * FROM bedrijven ORDER BY id ASC LIMIT $first , $last ");
while($r=mysql_fetch_array($getbedrijven)){
// THE CODE TO ECHO ALL THAT STUFF GOES HERE
}
?>
Im trying to show 8 results on each page. On page one it work great, it shows 8 results, on page 2 it suddenly shows 10 results!!! wth? on page three it shows the last two results of page 2 + another one. I currently have 17 rows in my database. Im completly stuck, confused and pissed. plz help, ty
Edited by Avalanche, 04 January 2006 - 02:13 PM.
