ei im trying to make a bulletin board and i sort of wanted to implement a paging method coz i was thinking wat if a lot of people would post then let's say d post would reach bout 100, i dont want my page to scroll so long so i decided to use paging like the forums here...sori im trying my best to explain d situation hehehe.. so here's my code i cant figure out what's wrong id really appreciate ur help
<?php
include("dbInfo.php");
if(empty($bID))
$bID = 0;
else
$bID = $GET['bID'];
$query = "SELECT bulletinBoard.*,schoolRecord.*
FROM bulletinBoard,schoolRecord
WHERE bulletinBoard.schoolID = schoolRecord.schoolID
AND bulletinBoard.bulletID >= $bID
AND bulletinBoard.bulletID < bulletinBoard.bulletID+5";
$result = mysql_query($query);
$row = mysql_num_rows($result);
?>
//in another part i placed this one
<?php
$ctr = 0;
if($row != 0)
{
while($data = mysql_fetch_array($result))
{
echo(" <a href = \"subBulletin.php?id={$data['bulletID']}\" style = \"text-decoration:none\"> <b> {$data['bulletTitle']} </b> </a> <br>");
echo("by : {$data['firstName']} {$data['lastName']} <br> ");
}
}
?>
my problem is in the first php code where i did the query..
AND bulletinBoard.bulletID < bulletinBoard.bulletID+5 <---this statement should have just allowed only five news but it still outputs everything in the database...