[FX.php List] Dealing with a found set

Bob Patin bob at patin.com
Wed May 16 08:12:05 MDT 2007


True, but I use the value of $x in my link to view the detail for  
each record;

In other words, the link that I put for each record says "detail.php? 
r=<?php echo $x; ?>". That way, I can navigate in the detail screen  
(add forward and back buttons) using this number, by incrementing and  
decrementing it...

In my detail page, rather than pulling in a recid, I pull in this $x  
value, and then use the $x value to retrieve the correct recid from  
my stored array. By doing it this way, I can use this single detail  
page and enable stepping thru the records...

Not sure if this is clear, but at any rate it works great... :)

Bob


On May 16, 2007, at 6:35 AM, Erik Andreas Cayré wrote:.

> I would simplify the above code like his::
>
> 		  foreach($queryResult['data']as $key=>$queryData){
> 		  		// create foundset array of record IDs
> 				$_SESSION['foundset'][] = $queryData['recid'][0];
> 				//--------------------------------------------
>
> Then, put this after the table, after the close of the FOREACH loop:
>
> }
>
> There is no need for $x in the code you showed, and you can stuff  
> your data directly into the $_SESSION array...
>
> ;-)
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20070516/dd1637b6/attachment.html


More information about the FX.php_List mailing list