Skip to main content
Inspiring
December 17, 2010
Answered

Recordset paging by A,B,C....instead of Next Page, Prev Page, etc.?

  • December 17, 2010
  • 1 reply
  • 6256 views

Hello geniuses,

I was wondering if there is a way to do the following:

I currently have a member database (MySQL) that I manage for a client. Using DW CS4, I used the built-in Recordset paging to add a navigation bar to the top of the member listing, limiting it to 50 per page. Since there are so many members in this organization, my client has asked me to create an A,B,C...navigation bar, rather than First Page - Next Page - Prev Page - Last Page. Is there a way to do this? Note that if a member is added or dropped from the list and they happen to be the first of the B's (for example), then the marker has to move accordingly. Thanks for pointing me in the right direction.

Regards,

Gail

This topic has been closed for replies.
Correct answer Günter_Schenk

First, you were correct about the missing single quotes, and that solved

the problem. Thanks very much.

So, a feature it is! I guess there's no real harm done to load more at

the "first look" of the member list. It does work correctly for all

letters. You are right in that if I drop "maxusers" down to 10 or 20,

the bottom half of, say, the Bs, gets cut off.

I originally had the Recordset Paging Navigation Bar on my page, but my

client didn't like it because he had to page through and hunt for

members. Hence my determination to provide an A,B,C navigation for him,

which you have so kindly helped me with. I didn't think about using both

features - the paging navigation bar, plus the A,B,C navigation. That

would definitely solve the worry of someday going over 50 members in any

given letter and not noticing that the list is cut off. I'll add it back.

I want to thank you profusely for all your help on this. Not only have

you stuck with me, but your timely responses meant I could finish this

today. You are my new best friend!

Best regards,

Gail


Gail,

it´s been a real pleasure to participate in such an intense "dialogue", and I salute you for remaining persistent !

Cheers,

Günter

1 reply

December 17, 2010

By A,B,C... do you mean that clicking on A will only show memebers whose name starts with A or do you mean like 1,2,3...10 etc where clicking on 1 will show the first 50 people that were entered into the DB? Please specify.

You can find useful information by searching for:

(your unmentioned server side scripting language) pagination

Inspiring
December 17, 2010

I mean that clicking on A will only display those whose last names

start with A. Sorry for any confusion.

Gail

Inspiring
December 20, 2010

Gail,

You need four things:

1.  Your links should have a URL parameter like this:  ?id=a

2.  Retrieve the value of "id" like" $_SERVER["id"[;

3.  Create a variable:  $LETTER = $_SERVER["id"]

4.  Insert variable in your SQL statement to filter the recordset:  SELECT * FROM table WHERE field LIKE '$LETTER%';

And if this helps solve your problem, do post back to let us know or post what worked for you.

J.S.
UltraSuite Extensions


I will let you know. Thanks for all the helpful suggestions. It will be Wed or Thurs before I can get back on this, but I will

post back when I have a solution that works.

Gail