[FX.php List] Dealing with a found set

Bob Patin bob at patin.com
Tue May 15 18:29:59 MDT 2007


Here's my code:


		  $x = 0;
		  foreach($queryResult['data']as $key=>$queryData){
		  		// create foundset array of record IDs
				$foundset[$x] = $queryData['recid'][0];
				$x++;
				//--------------------------------------------

Then, put this after the table, after the close of the FOREACH loop:

}
$_SESSION['foundset'] = $foundset;

On May 15, 2007, at 7:24 PM, Alex Gates wrote:

> Hi Dale -
>
> Would you (or anyone else who is feeling generous) mind showing a  
> snippet of code you use to do this?
> I think seeing the code would help me visualize this a little  
> better - it would be a great thing to know.
>
> Do you prefer this method to, say, a LAJAX method - where you have  
> the found set at the top and click the links to show the details on  
> the bottom?
>
> Dale Bengston wrote:
>> Hi Bob,
>> I generally store the record keys of the found set "list view" in  
>> a session array. Then when your client clicks through to the  
>> details, you can use the relative position of the current detail's  
>> record key to display a link to the previous and next records.
>> Dale
>> On May 15, 2007, at 6:34 PM, Bob Patin wrote:
>>> I have a client whose site does basic searches of a database; for  
>>> the found set, I have 3 "detail" links that show various details  
>>> for each of the records in the found set.
>>>
>>> Today the client told me that she'd like to be able to go to one  
>>> of these detail screens and then scroll through the found set  
>>> from the detail screen.
>>>
>>> So here's my question:
>>>
>>> Let's say the search returned 17 matches. I'd like to be able to  
>>> go to one of the 3 detail screens and then click a button to  
>>> "scroll" through the 17 records in the found set.
>>>
>>> What would be the easiest way to do this? Assuming the found  
>>> array is $searchResult, can I store $searchResult in a session  
>>> variable?
>>>
>>> Thanks,
>>>
>>> Bob Patin
>>> Longterm Solutions
>>> bob at longtermsolutions.com
>>> 615-333-6858
>>> http://www.longtermsolutions.com
>>>
>>>   CONTACT US VIA INSTANT MESSAGING:
>>>      AIM or iChat: longterm1954
>>>      Yahoo: longterm_solutions
>>>      MSN: tech at longtermsolutions.com
>>>      ICQ: 159333060
>>>
>>>
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list