[FX.php List] Related Records

Tom Sepper tsepper at dctandt.com
Tue Mar 21 09:04:20 MST 2006


As a followup.. Thanks for everyone's input. This worked perfectly!

I'm sure I'll have more questions as I delve deeper in development.

Thanks again!



-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Derrick Fogle
Sent: Monday, March 20, 2006 10:28 AM
To: FX.php Discussion List
Subject: Re: [FX.php List] Related Records

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



_______________________________________________
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