[FX.php List] Related Records

Derrick Fogle derrick at fogles.net
Mon Mar 20 09:28:24 MST 2006


If you want it to be similar to an FM portal, then use the portal.  
The last array element in any FX field reference indicates it's  
repeating field number or portal row number. You only need a single  
database query, and will get all the data on the referenced layout.  
Here's a sample of the code I use:

$prow = 0;
while($value['Relationshipname::ID_Field'][$prow]) {
	echo $value['Relationshipname::Data_Field'][$prow];
	echo "<br />";
	$prow++;
}

Salt to taste...

On Mar 20, 2006, at 10:08 AM, Tom Sepper wrote:

> Hello everyone,
>
> I've been lurking on this list for about six months now attempting  
> to grasp fx.php's functions and such.  Now that I've begun my  
> development, I have what is probably a very basic question..
>
> What is the best way to query for related records?  I know how I  
> want to display the records similar to a FileMaker portal, but  
> getting the data seems to be getting me!
>
> Thanks,
> Tom
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list


Derrick Fogle
derrick at fogles.net





More information about the FX.php_List mailing list