Question
Rotating Through Alphabetical List - In Order
Maybe I haven't had enough coffee or I'm just tired from
getting up in the middle of the night for my 1 year old, teething
daughter, but I just can't seem to think of a simple way to rotate
through a list in order. Here's what I'm trying to do... I have an
alphabetical list of companies displayed on my site (advertisers).
The companies at the bottom of the list are getting annoyed that
they're always at the bottom. So, I want to make the list of
companies start at a new position each time (in order). So, it
would start outputting in this order: a-z, then coufput "b-z" /
cfoutput "a" (two cfoutputs), then "c-z" / "a-b", etc.. But, I
don't want it to start at a-z for each new visitor to the page, I
want it to remember the last display, say d-z / a-c and start with
e-z for the next visitor.
One of my ideas relate to saving a variable in the database each time the page is viewed and doing a plus one to figure out the starting position. And, when it gets to the total number of records in the list starting back to 1. Isn't that too complicated. What am I forgetting?
Hopefully, someone can help me. Maybe I'll go get another cup of coffee and see if that helps....
One of my ideas relate to saving a variable in the database each time the page is viewed and doing a plus one to figure out the starting position. And, when it gets to the total number of records in the list starting back to 1. Isn't that too complicated. What am I forgetting?
Hopefully, someone can help me. Maybe I'll go get another cup of coffee and see if that helps....
