Re: Help needed in maximum post per page
| From: | jeffrey_n_Dyke at Keane dot com | Date: | Fri, 16 May 2003 11:05:20 +0000 |
| Subject: | Re: Help needed in maximum post per page | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-27806@lists.php.net to get a copy of this message | ||
the archives of this list have many many answers to this need.
or use a class
http://phpclasses.promoxy.com/browse.html/package/202.html
jeff
"Ahmed Abdelaliem"
<ahmed_abdelaliem@ho To: php-db@lists.php.net
tmail.com> cc:
Subject: [PHP-DB] Help needed in maximum post per
page
05/16/2003 06:56 AM
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>
";
}
?>
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php