[FX.php List] simple find in FM7 with Related fields
Jane Chinn
Jane.Chinn at cwu.EDU
Wed Apr 20 16:45:28 MDT 2005
Hi,
When using FM Server 7 and a database with related fields contained in
another FM7 Db and a page that does a test search(see php page below):
I get an error which is:
Warning: Cannot use a scalar value as an array in
/Library/WebServer/Documents/forgetest/search_results.php on line 21
Warning: Invalid argument supplied for foreach() in
/Library/WebServer/Documents/forgetest/search_results.php on line 21
LastName:
<?php
include_once('../FX/FX.php');
include_once('../FX/FMErrors.php');
include_once('../FX/server_data.php');
$LastName=$_POST['LastName'];
$groupSize='1';
$search=new FX($serverIP,$portNumber,'FMPro7');
$search->SetDBData('peer_roster.fp7','Layout1',$groupSize);
$search->AddDBParam('LastName',$LastName);
$searchResult=$search->FMFindall();
echo $searchResult['errorCode'];
foreach($searchResult['data'] as $key=>$searchData);
?>
<html>
<head>
</head>
<body>
LastName: <? echo $searchData['LastName'][0]; ?>
</body>
</html>
Does anyone know what causes this and how to fix it. The relationship
(LastName) is is actually in another database not in the one being
searched. This same simple search of another database with the same
field name is not a problem.
Thanks,
Jane
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1475 bytes
Desc: not available
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20050420/16963c3f/attachment.bin
More information about the FX.php_List
mailing list