[FX.php List] fx/php newbie

Louie Miranda lmiranda at gmail.com
Fri Oct 22 01:34:54 MDT 2004


how about editing? the -recid seems to be complicated.


On Thu, 21 Oct 2004 16:36:58 -0500, Jason H. Awbrey
<jason at stravinsoft.com> 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
> 
> 
> 
> 


-- 
Louie Miranda
http://www.axishift.com


More information about the FX.php_List mailing list