Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Cannot get recordset navigation to work

Guest
Oct 13, 2008 Oct 13, 2008
I've created a search results page with a recordset titled rsPhoneList. Here is the code for it that DW created:
SELECT *
FROM DistrictPhoneList
WHERE EmpName LIKE %colname%

When I run a test on it, it displays 17 of my records when I put in a few letters for a name and indeed there are 17 records. That works great. For the repeat region, I changed it to show 10 records at a time. When I do the search, it comes up with 10 records.

However, the navigation bar will not work. I go to Insert, Dynamic Data, Recordset Paging, Recordset Navigation. It created my recordset navigation bar. I save and upload. When I do the search it shows me the first 10 records. When I click Next, it shows me an empty table with the correct headings, but no records. Nothing works, the previous, next, last. Here is the code it created:
<table border="0">
<tr>
<td><?php if ($pageNum_rsPhoneNames > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_rsPhoneNames=%d%s", $currentPage, 0, $queryString_rsPhoneNames); ?>">First</a>
<?php } // Show if not first page ?>
</td>
<td><?php if ($pageNum_rsPhoneNames > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_rsPhoneNames=%d%s", $currentPage, max(0, $pageNum_rsPhoneNames - 1), $queryString_rsPhoneNames); ?>">Previous</a>
<?php } // Show if not first page ?>
</td>
<td><?php if ($pageNum_rsPhoneNames < $totalPages_rsPhoneNames) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_rsPhoneNames=%d%s", $currentPage, min($totalPages_rsPhoneNames, $pageNum_rsPhoneNames + 1), $queryString_rsPhoneNames); ?>">Next</a>
<?php } // Show if not last page ?>
</td>
<td><?php if ($pageNum_rsPhoneNames < $totalPages_rsPhoneNames) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_rsPhoneNames=%d%s", $currentPage, $totalPages_rsPhoneNames, $queryString_rsPhoneNames); ?>">Last</a>
<?php } // Show if not last page ?>
</td>
</tr>
</table>

What am I doing wrong or what can I do to get it to work correctly and show me the rest of the records in the recordset.
Thanks,
--Linda
TOPICS
Server side applications
268
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 14, 2008 Oct 14, 2008
LATEST
On the search page, using Post doesn't seem to work with the Recordset Paging, Insert Navigation bar. I did some further reading and saw that someone else had the issue as well and changed to GET. I did that and now everything works.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines