MySQL Forums
Forum List  »  PHP

Re: Spreading MySQL results over multiple Pages
Posted by: Brian Moon
Date: January 02, 2006 04:34PM

Brian Gannon wrote:
> <?php
> $maxRows_rs_menu = 3;
> $pageNum_rs_menu = 5;
> if (isset($_GET['pageNum_rs_menu'])) {
> $pageNum_rs_menu = $_GET['pageNum_rs_menu'];
> }
> $startRow_rs_menu = $pageNum_rs_menu *
> $maxRows_rs_menu;
> //------------------------------------------------
> ---------
> mysql_select_db($database_BoxingOscar,
> $BoxingOscar);
> $query_rs_menu = "SELECT model_id, image_id,
> firstname, uploaddate FROM models ORDER BY
> uploaddate DESC";
> $query_limit_rs_menu = sprintf("%s LIMIT %d, %d",
> $query_rs_menu, $startRow_rs_menu,
> $maxRows_rs_menu);
> $rs_menu = mysql_query($query_limit_rs_menu,
> $BoxingOscar) or die(mysql_error());
> $row_rs_menu = mysql_fetch_assoc($rs_menu);


You are initializing $pageNum_rs_menu as 5. Why are you doing that?

Brian Moon
Phorum Dev Team
http://phorum.org/
-----------------------
dealnews.com - How to go broke saving money.
http://dealnews.com/

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.