[FX.php List] Related Data on a second server

Stephe Pocock zippyaus at yahoo.com
Mon May 28 02:47:13 MDT 2012


Hi all

For performance and dependability reasons we have two Filemaker servers.

On server one I have a comments database and on server two I have a contacts database.

Comments display the related contact in Filemaker without and issue.

If I try and display the contact details in the results returned on the comments database, I don't get a result.

Is this possible using FX.php?

I am trying to get the full name to return from the contacts database. <?php echo $comment['Comment_StaffContact::FullName'][0];?> 

Full code below.

Any help would be greatly appreciated.

Regards

Stephen


<?php
include_once("FX/FX.php");

include_once("FX/server_data.php");
include_once("FX/FMErrors.php");

$resourceId=$_REQUEST['resourceId'];
$resourceType=$_REQUEST['resourceType'];

$comments=new FX($serverIP,$webCompanionPort,'FMPro7');

$comments->setDBData('Precedents.fp7','comment_web','1000');
$comments->SetDBUserPass ($webUN, $webPW); 

$comments->AddDBParam('Comment::resource_id',$resourceId);
$commentsResult=$comments->FMFind();
//foreach ($commentsResult['data'] as $key => $comment)

?>
<?php
if($commentsResult['foundCount'] == 0){
echo 'resource id';
include_once("includes/error.php");
}
else{?>
<html>
<head>
<title>Precedents</title>
</head>
<body>
    <div id="primary_content">
            <ul class="comments">
                <?php foreach ($commentsResult['data'] as $key => $comment) { ?>
                <li>
                    <div><span class="comment_name"><?php echo $comment['Comment_StaffContact::FullName'][0];?> </span> <?php echo $comment['comment_text'][0];?> </div>
                </li>
                <?php } ?>
            </ul>
    </div>
</body>
</html>
<?php } ?>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20120528/56f2f703/attachment.html


More information about the FX.php_List mailing list