[FX.php List] Field from Related Table

Jane Chinn Jane.Chinn at cwu.EDU
Mon Jul 31 12:02:51 MDT 2006


Hi Steve,

Here is an example of a field from a related table referenced in a  
page with fields from the main table. The name of the related table  
is "real_video_test".

<input type="text" size="50" name="faculty_name" value="<?php echo  
$searchData['real_video_test::faculty_name'][0]; ?>">

Note that this is a form in which the action is an edit.  It says  
search which may be confusing but I use for the search form as well.   
It could just as well have $edit as the variable.  The $v1 variable  
is used to draw out a value list used in one of the fields in the  
page.  In the head of the file here are the required FX.php scripts:

<?php
include_once('../FX/FX.php');
include_once('../FX/FMErrors.php');
include_once('../FX/server_data.php');

$recid=$_GET[recid];

$search=new FX($serverIP,$portNumber);
$search->SetDBData('MTISvideos.fp7','Layout1');
$search->AddDBParam('-recid',$recid);

$searchResult=$search->FMFind();
foreach($searchResult['data'] as $key=>$searchData);

$v1=new FX($serverIP,$portNumber);
$v1 -> SetDBData('MTISvideos.fp7','Layout1');
$v1Result = $v1 -> FMView();

?>

Regards,

Jane Chinn
Central WA Univ.

On Jul 31, 2006, at 10:34 AM, Steve Roberson wrote:

> Hello,
>
> I have a PHP file that connects to a file hosted by FileMaker 8  
> Server Advanced without any problem but when I add a field from a  
> related table to the layout I'm connecting to I get the following  
> error.
>
> [message] => FX: 7 ExecuteQuery XML error: no element found at line 1
>
> The user I'm connecting as has permissions on both this and the  
> related file.  I've not done much with FX so please forgive me if  
> I'm asking a stupid question.  I've been wrestling with this issue  
> on and off for a week.  I'd appreciate any insights anyone has to  
> offer.
>
> Thanks,
> Steve Roberson
> Web Developer
> Zurka Interactive
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

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


More information about the FX.php_List mailing list