Help needed in maximum post per page
| From: | someone human | Date: | Fri, 16 May 2003 00:19:42 +0000 |
| Subject: | Help needed in maximum post per page | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-27793@lists.php.net to get a copy of this message | ||
Hi,
i have a problem here,
i am inserting data into mysql and retrieve it in a html table,
i need to limit the posts only to be 50 row per page,
how can i do that and how to make a link for the new pages that contains th rest of the list (Link Next, Previuos or Page 1 | 2 | 3 ........)
The query i am using to read the data is :
<?
@ $db = mysql_connect("localhost");
mysql_select_db("egycds");
$query = " SELECT * FROM newpcgames order by gameid desc";
$result= mysql_query($query);
while ($record=mysql_fetch_array($result)){
echo "
<TR bgColor=#475674>
<TD width=75>
<DIV align=center><FONT
color=#ffffff>";
echo stripslashes($record[date]) ;
echo "</FONT></DIV></TD>
<TD width=90>
<DIV align=center><FONT color=white>";
echo stripslashes($record[type]) ;
echo "</FONT></DIV></TD>
<TD><FONT color=#ffffff> <A
href=\"";
echo stripslashes($record[link]);
echo "\" target=_new2>";
echo stripslashes($record[name]);
echo "</A> </FONT></TD>
<TD width=50>
<DIV align=center><FONT color=#ffffff>";
echo stripslashes($record[cds]);
echo "</FONT></DIV></TD> <TD width=80>
<DIV align=center><FONT color=#ffffff>";
echo stripslashes($record[rate]);
echo "</FONT></DIV></TD>
<TD width=70>
<DIV align=center><FONT color=#ffffff><A
href=\"";
echo stripslashes($record[downloaderlink]);
echo "\">";
echo stripslashes($record[downloader]);
echo "</A></FONT></DIV></TD>
<TD align=middle vAlign=center width=15><FONT
color=#ffffff> </FONT></TD>
</TR>
";
}
?>
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail