Hi,
I am trying to perform two separate finds on two separate databases from within one php script.
It works, but itermittently I get the message:
Error: unable to open file displayed in the browser.
If I refresh it normally disappears.
If I strip the code down to just perform one find on one of the databases it works every single time with no errors, on either of the two databases / search criteria.
It just seems the combination of the two throws an occasional error.
Here's the code:
<?php
include('Filemaker.php');
?>
Total Number of Projects
<?php
$fm = new FileMaker('xxxx.fp7', 'myhost', 'myusername', 'mypassword');
$findCommand =& $fm->newFindCommand('mylayout');
$findCommand->addFindCriterion('Data Storage', 'No');
$findCommand->addFindCriterion('Customer', 'xxx');
$result = $findCommand->execute();
if (FileMaker::isError($result))
{
echo "
Error: " . $result->getMessage() . " ";
exit;
}
else
{
echo
' '.$result->getFoundSetCount();'';
}
?>
Total Number of Lines
<?php
$fm = new FileMaker('yyy.fp7', 'myhost', 'myusername', 'mypassword');
$findCommand =& $fm->newFindCommand('mylayout');
$findCommand->addFindCriterion('current', 'yes');
$result = $findCommand->execute();
if (FileMaker::isError($result))
{
echo "
Error: " . $result->getMessage() . " ";
exit;
}
else
{
echo
' '.$result->getFoundSetCount();'';
}
?>
Any ideas anyone?
In advance, many thanks.
Simon