[FX.php List] Faster record creation?

John Funk csinfo at comcast.net
Wed Sep 17 07:52:33 MDT 2008


Bob,
FX PHP DOES wait for the script to finish in this case. I watched the record
count increase and when it was to 1064 the result web page came up.
This may be because I am calling the script inside an FMFind() function, see
below. I put a timer in the php to get my test times for both methods.

$request = new FX($ServerIP, $port, 'FMPro7');
$request->SetDBData($db, 'web_comp',"1");
$request->SetDBUserPass($fmAccount, $fmPass);
$request->SetDBUserPass('webuser', 'webpass');
$request->AddDBParam('COMPANY', $_REQUEST["Company"]);
$request->AddDBParam('ADDRESS', $_REQUEST["Address"]);
//run the FM script to make the Comp_Cat records
$request -> AddDBParam("-script", "Make CompCat Records This Company");
$result = $request->FMFind();
$records = $result['data'];
//get the data from the company
foreach($records as $record)
{
$Company=$record['COMPANY'][0];
$CompID=$record['COMPANY ID'][0];
$Pass=$record['PASSWORD'][0];
$CompRecID=$record['RecordID'][0];
}

Thanks
John

-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Bob Patin
Sent: Wednesday, September 17, 2008 7:56 AM
To: FX.php Discussion List
Subject: Re: [FX.php List] Faster record creation?

I would have thought that wouldn't make any difference, since the  
script runs independently of anything PHP is doing. Once the script is  
triggered, it's not communicating w/ PHP, so how could it be faster  
when triggered from a PHP page?

I have to believe that perhaps your timing process wasn't quite correct.

Here's how I would time it: have the database open and visible when  
the script is triggered, have the script show you a dialog--once you  
click OK in the dialog, the stopwatch should start.

Then I'd probably take out the dialog and run it again, and see if the  
2 results are almost the same.

The point here though, is that it took 7 seconds in FileMaker, versus  
80 seconds in PHP--which is what I was expecting, based on experiences  
I've had here.

Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
iChat: bobpatin
AIM: longterm1954
FileMaker 9 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--------------------------
FileMaker hosting and consulting for all versions of FileMaker
PHP . Full email services . Free DNS hosting . Colocation . Consulting

On Sep 17, 2008, at 6:33 AM, Jon & Jane Montgomery wrote:

> John,
>    Are you saying that the FMScript runs faster when triggered from  
> php via
> FX as opposed to someone triggering the script from FileMaker itself?
> Just wanted to be sure I understand what you were saying.
>
> Jon Montgomery
>
> On 9/17/08 12:25 AM, "John Funk" <csinfo at comcast.net> wrote:
>
>> BTW the FileMaker script runs 10x faster as a faceless process  
>> (called from
>> php) rather than running the FM script on a FM client, even without  
>> screen
>> refreshing.
>>
>> John Funk
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list