#41170 [Opn->Bgs]: search script next and previous options not working

From: Date: Mon, 23 Apr 2007 07:07:38 +0000
Subject: #41170 [Opn->Bgs]: search script next and previous options not working
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-111797@lists.php.net to get a copy of this message
ID: 41170 Updated by: derick@php.net Reported By: vedurupakamahesh at gmail dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: windows xp PHP Version: 4.4.6 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. . Previous Comments: ------------------------------------------------------------------------ [2007-04-23 07:01:14] vedurupakamahesh at gmail dot com Description: ------------ Hi.this is mahesh. i worte a scrit for retriving records with next,previous buttons and pagenumbers.But when i press next or pagenumbers like 1,2 that will not display next regarding records.i have 30 records and i displaying initially 10 records.next 10 records are not displaying when i press next.please help me. Reproduce code: --------------- if (!isset($screen)) $screen = 0; $start = $screen * $rows_per_page; $sql = "SELECT name FROM student_adv "; $sql .= "LIMIT $start, $rows_per_page"; $result = mysql_query($sql) or die(mysql_error()); $rows = mysql_num_rows($result); //echo $rows; for ($i = 0; $i < $rows; $i++) { $description = mysql_result($result, $i, 0); echo "$description<br>\n"; } echo "<p><hr></p>\n"; // let's create the dynamic links now if ($screen > 0) { $url = "search1.php?screen=" . $screen - 1; echo "<a href=\"$url\">Previous</a>\n"; } // page numbering links now for ($i = 0; $i < $pages; $i++) { $url = "search1.php?screen=" . $i; echo " | <a href=\"$url\">$i</a> | "; } if ($screen < $pages) { $url = "search1.php?screen=" . $screen + 1; echo "<a href=\"$url\">Next</a>\n"; } Expected result: ---------------- show next 10 records when i press next link. Actual result: -------------- The requested URL /mahesh/1 was not found on this server. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41170&edit=1

« previous php.bugs (#111797) next »