Help needed in maximum post per page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>&nbsp;&nbsp;<A
                               href=\"";
                               echo stripslashes($record[link]);
                               echo "\" target=_new2>";
                               echo stripslashes($record[name]);
                               echo "</A>&nbsp;&nbsp;</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>&nbsp;</FONT></TD>
</TR>
";
}
?>


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail



-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux