Hello
I could really use some expert help here to determine why my output does not generate the Prev 1 2 3 4 5 6 7 8 Next links at the bottom of my output that it's designed to display. I've been beating myself up for hours if not days trying to figure this out.
I've currently set the number of rows to display through a variable named $limitrows = 3 but after displaying the rows, the next line only displays two paragraph markers () without any links.
Here's the searchpage.php code below and the attached file (pagedresults.txt) is the Class definition for the search routine
1 <?php
2 include("settings.inc");
3 include("pagedresults.php");
4 mysql_select_db("$mydb",$connection);
5 ?>
6 <form action="<?=$PHP_SELF?>" method=post>
....
....
....
.... All of the Selections here....
.... and submit button here.
7 </form>
8 </table>
9 <?php
10 if ($submitsearch == "Submit") {
11 $pstatus = 'Active';
12 $rs = new MySQLPagedResultSet("Select
ID,COMMUNITY,ZONE,
OPENHOUSE,PTYPE,PRICE,BEDROOMS,BATHS,GARAGE,
13 TOTAL_SQFT FROM properties WHERE PRICE >= '$Starting' &&
PRICE <= '$Ending' &&
14 STATUS='$pstatus' ORDER BY COMMUNITY,PTYPE,PRICE",
$limitrows,$connection);
15 } //End of submitsearch
16 while ($row = $rs->fetchArray()) {
17 $recordid = $row["ID"];
18 $Acctid = $row["ACCT"];
19 echo("<tr><td>" . $row["COMMUNITY"] . "</td>");
20 echo("<td>" . $row["ZONE"] . "</td>");
21 echo("<td>" . $row["PTYPE"] . "</td>");
22 echo("<td>" . $row["OPENHOUSE"] . "</td>");
23 echo("<td>" . $row["TOTAL_SQFT"] . "</td>");
24 echo("<td>" . $row["BEDROOMS"] . "</td>");
25 echo("<td>" . $row["BATHS"] . "</td>");
26 echo("<td>" . $row["GARAGE"] . "</td>");
27 echo("<td>" . $row["PRICE"] . "</td>");
28 echo("<td><a href='displayproperty.php?
dproperty=$recordid'>
Display</A></td>");
29 }
30 echo "<tr><td colspan=10 align=center>";
31 echo "$rs->getPageNav()";
32 echo "</td></tr>";
33 echo("</Table>");
34 ?>
Line 12 is the constructor that generates an instance of the class
Line 16 is the fetcharray method of the class
Line 31 is the function that's supposed to display the
Prev 1 2 3 4 5 6 7 8 Next links
also line 31 can pass an optional variable otherwise it's left blank.
Why do I only get a display of () when there are more pages and rows to display?
Any help would be greatly appreciated. 😕