Re: Help needed in maximum post per page

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

 



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:      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>&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>
                            ";
                            }
                            ?>

_________________________________________________________________
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





-- 
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