Re: Clarification: Jump to a record/PHP paging...

From: Date: Sat, 23 Dec 2006 17:06:05 +0000
Subject: Re: Clarification: Jump to a record/PHP paging...
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-246174@lists.php.net to get a copy of this message
At 11:24 AM -0500 12/23/06, Robert Cummings wrote:
On Sat, 2006-12-23 at 11:05 -0500, tedd wrote:
In my opinion, wrong thinking. You ask how many records appear before and after a search string result. That's like asking "What's the difference between an orange?" -- it doesn't make sense.
It makes perfect sense. He has an order to his universe of items. The search criteria pull out a subset of his universe and he wants to know where in the universe any given item normally lies.
Okay, but in what order? Numerically, alphabetically, temporally (time entered, time last altered), likeness, length, height, width, weight, density, color, or what? You need to measure the item to others in some frame of reference.
This is akin to asking I want all words from the dictionary that have monster in their definition, then look at the word Yeti and saying ok, now where does Yeti lie with respect to all other words.
Again, in my opinion, that's fuzzy thinking. Sure, Yeti may be in the monster sub-set, but how much monster it is as compared to Lockness? You need a means, a yardstick, to compare the two with each other. Like, is Lockness bigger than the Yeti while monster-mouse is smaller, or what?
Now to provide the answer he wants... AFAIK you need to select all items from the table and populate into a temporary table with auto increment. Then select the item in question and it's temporary ID from the temporary table.
Sure, if you can decide on what bases to select and sort the other items to populate the table. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#246174) next »