[FX.php List] [OFF] A FileMaker API question

Bob Patin bob at patin.com
Sat Apr 12 14:43:46 MDT 2014


To be clear: the host name is right, as are all the other parameters at the top; the PHP and XML privileges are turned on--FX tests out fine. I'm trying to do some FMS 13 tests, and just not getting anywhere with the API. The layout is called "data" so that's not the issue either.

BP


On Apr 12, 2014, at 3:41 PM, Bob Patin <bob at patin.com> wrote:

> I've used the API infrequently; it's been about 3 years or maybe more since I wrote anything with it, and now my little test isn't working.
> 
> Here's my code:
> 
> <?php
> 
> require('API/FileMaker.php');
> 
> $DB_HOST = 'xxxxx;
> $DB_NAME = 'wpe_test';
> $DB_USER = 'web';
> $DB_PASS = 'pass';
> 
> $db = new FileMaker($DB_NAME, $DB_HOST, $DB_USER, $DB_PASS);
> 
> $q = $db -> newFindAllCommand('data');
> $qResult = $q->execute();
> 
> if (FileMaker::isError($qResult)){
> 	die('API Error: '.$qResult->getMessage());
> }
> 
> $qArray=$qResult->getRecords();
> 
> foreach($qArray as $data){
> 	echo $data->getField('lastname').'<br />';
> }
> 
> ?>
> 
> You can see it here
> 
> http://phptest.longtermsolutions.com/test_api.php
> 
> I know it has to be something stupid, but I can't remember well enough to find it...
> 
> Thanks for any help,
> 
> Bob Patin
> Longterm Solutions
> bob at longtermsolutions.com
> 615-333-6858
> FileMaker 9, 10, 11 & 12 Certified Developer
> http://www.longtermsolutions.com
> -
> iChat: bobpatin at me.com
> Twitter: bobpatin
>> FileMaker Consulting 
> FileMaker Hosting for all versions of FileMaker
> PHP • Full email services • Free DNS hosting • Colocation • Consulting
> 
> _______________________________________________
> 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