PHP ver gevorderde |
|
Ik heb dit :
<?
$AantalPerPagina = 20; //hoeveel leden per pagina?
if(!$_GET[n]) { $n = 0; }
else{ $n = $_GET[n]; }
//$n = intval($n+1);
$a = $n - 1;
$b = $n - 2;
$x = $n * $AantalPerPagina;
$res2 = mysql_query("SELECT * FROM forumreplys ORDER BY id DESC LIMIT ".($n * $AantalPerPagina+1).", $AantalPerPagina WHERE forumid=$forumid") or die(mysql_error());
?>
<? $AantalPerPagina = 20; //hoeveel leden per pagina? if(!$_GET[n]) { $n = 0; } else{ $n = $_GET[n]; } //$n = intval($n+1); $a = $n - 1; $b = $n - 2; $x = $n * $AantalPerPagina; $res2 = mysql_query("SELECT * FROM forumreplys ORDER BY id DESC LIMIT ".($n * $AantalPerPagina+1).", $AantalPerPagina WHERE forumid=$forumid") or die(mysql_error()); ?>
en krijg dit :
Citaat: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE forumid=31' at line 1
|