[FX.php List] fx/php newbie

Nick Trenary nick at mail.crlibrary.org
Fri Oct 22 08:16:12 MDT 2004


That is exactly what I need.  I simply could not figure out how to view the 
fields.  Thanks for your help!

Nick

At 04:36 PM 10/21/2004, you wrote:
>Hi Nick,
>
>Here is a a simple example of the basics you would need to return a found 
>set from FileMaker with FX.php:
>
>//query to retrieve records
>$query = new FX($serverIP, $webCompanionPort);
>$query->SetDBData("DatabaseName", "LayoutName");
>$query->SetDBPassword('password', 'username');
>$query->AddDBParam('fieldname', 'value your are searching for');
>$query->AddDBParam('related::fieldname', 'test');
>$query->AddSortParam('sortField', 'ascend');
>$result = $query->FMFind();
>$currentKey = key($result['data']);
>
>Then, when you want to loop through the record set:
>
>if ($result['foundCount'] > 0) {
>         foreach ($result['data'] as $key => $value) {
>                 echo $value['fieldName'] . "<br />";
>         }
>}
>
>This is pretty basic but it should get you started.
>
>HTH,
>Jason H. Awbrey
>StravinSOFT, Incorporated
>http://www.stravinsoft.com
>
>
>
>On Oct 21, 2004, at 4:07 PM, Nick Trenary wrote:
>
>>  I'm just starting to get my feet with php and FileMaker.  Php and FM 
>> are both set up correctly.  I have been able to show an array of a 
>> search using 'print_r ($results)' .  I understand the concept arrays but 
>> am unclear as to how to write the code to print the results on a web 
>> page.  Sort of loop will be needed, that I understand too.  But how is 
>> the code for the array written to 'cycle' through each record?  This is 
>> probably a very elementary bit of code but I cannot find any 
>> documentation or example for this.  Can anyone steer me in the right direction?
>>
>>  Thanks,
>>  Nick
>>
>>
>>  ----
>>  Nick Trenary
>>  Computer Information Systems Analyst
>>Cedar Rapids Public Library
>>Office:(319) 398-5145 x267
>>  Work cell: (319) 310-7699
>>_______________________________________________
>>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