Wesley Miller Posted November 21, 2004 Posted November 21, 2004 I am working on a project I know how to do previous and next with FX.php but now I need to be able to add numbers like (1-2-3-4) so I can jump from page to page. Just like when the search results of a found set are shown, I need to figure out a way for those numbers to show up as well!! Please let me know if you know how to do this! Regards, Wes
Garry Claridge Posted November 21, 2004 Posted November 21, 2004 Divide the number of "Found Records" by the number per page. Then use a loop to "echo" the page numbers. The "Link" for each of these page numbers will use a "Skip" with the relevant number. Good Luck. Garry
Wesley Miller Posted November 21, 2004 Author Posted November 21, 2004 Dear Garry, Thank you for your answer, but I have honestly no idea how to do that. Can you give me an example of how to do that with the FX.php code? or do I do this with just regular php. If you could give me an example, I would GREATLY, GREATLY appreciate it! Regards Wes
Garry Claridge Posted November 21, 2004 Posted November 21, 2004 Wes, I don't use FX, however I do use PHP with FM. From my limited knowledge of FX I know: 1. From this: $pagesize = 10; $query->SetDBdata('mydb.fp5', 'mylayout', $pagesize); ..... $result = $query->FMFind(); 2. I can check: $foundrecords = $result['foundCount']; $pages = $foundrecords/$pagesize; for($i=1;$i<=$pages;$i++) { echo ("Page <a href='?:??'>" . $i) . "</a> | "; }; 3. The Link (:?) needs to have its "Skip" value incremented to represent each page. That is about all I can do for now. I would not be available for another few weeks to write the whole process. However, other people on the forum may already have some code for this as it would be a common requirement. All the best. Garry
Wesley Miller Posted November 21, 2004 Author Posted November 21, 2004 Dear Garry, Thank you very much for your help! This at least gives me a good place to start! Thank you for your help with you code! I will let you know if I can get it to work! Best Regards Wes
Recommended Posts
This topic is 7383 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now