[FX.php List] Please help with slow code
Stephe Pocock
zippyaus at yahoo.com
Thu Jun 26 03:10:15 MDT 2014
Hi
We pretty much use the same code for all our FX pages. Ever since we moved from Filemaker 11 this has been a lot slower to load.
I use the latest FX.php and FMalt
I would greatly appreciate it if someone could review this code and let me know if there is anything out of the ordinary.
<?php
define('DEBUG', FALSE);
include_once("../FX/FX.php");
include_once("../FX/server_data.php");
include_once("../FX/FMErrors.php");
$TitleID=$_REQUEST['Initial'];
$cat=new FX($serverIP,$webCompanionPort,'FMAlt');
$cat->setDBData('FMOnline','TQS_Manual_PHP', 'ALL');
$cat->SetDBUserPass ($webUN, $webPW);
$cat->AddDBParam('Initial',$TitleID);
$cat->AddDBParam('Reference','FMP');
$cat->AddSortParam('Title','ascend');
$catResult=$cat->FMFind();
foreach ($catResult['data'] as $key => $catData)
?>
<html>
<head>
<title>Forms, Manuals and Publications</title>
</head>
<body>
<table width="600" border="0">
<?php
$checkHeader = NULL;
foreach ($catResult['data'] as $key => $catData)
{
$Title = $catData['Title'][0];
$URL = $catData['URL'][0];
$target = $catData['c_URL_target'][0];
echo "<tr valign='top'>\n
<td width='20' height='15'>
<div align='center'><img src='/Images/Bullet.png' width='9' height='12'> </div></td>\n
<td><a href='$URL' target='_blank'>$Title</a> </td>\n
</tr>\n";
}
// End the foreach loop
?>
</table>
</body>
</html>
There are less than 100 records and it takes up to a minute to load.
We are using FMS13 on iis 2008R2.
Thanks in advance.
Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20140626/4d7685e4/attachment.html
More information about the FX.php_List
mailing list