[FX.php List] [OFF] API Equivalent for Grabbing RECID
Gjermund Gusland Thorsen
ggt667 at gmail.com
Thu Apr 3 08:46:47 MDT 2008
When shrinks receive clients that attempt to shoot themselves in the food,
it's OK?
2008/4/3, Steve Winter <steve at bluecrocodile.co.nz>:
> On the condition that they are the client, and they say 'I want you to build
> me a web interface which uses the PHP API built in to FileMaker'.
>
> Even if you tell them there are good reasons why they should use FX, still
> some clients will say, use the API... in my experience this is usually
> because they have limited knowledge, but see the API as an 'official' part
> of FMP, where as FX is an add-on, which they see as unnecessary...
>
> My 2p worth ;-)
>
> Cheers
>
> Steve
>
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Gjermund Gusland
> Thorsen
> Sent: 03 April 2008 15:35
> To: FX.php Discussion List
> Subject: Re: [FX.php List] [OFF] API Equivalent for Grabbing RECID
>
> On which conditions?
>
> 2008/4/3, Dale Bengston <dbengston at preservationstudio.com>:
> > Sometimes the client makes that choice.
> >
> >
> > On Apr 3, 2008, at 3:55 AM, Gjermund Gusland Thorsen wrote:
> >
> >
> > > Hmm, is it just me, or where do you find arguments for using FileMaker
> > > PHP API when you already know FX.php?
> > >
> > > ggt
> > >
> > > 2008/4/3, Leo R. Lundgren <leo at finalresort.org>:
> > >
> > > > If you look at the API reference (included with the package, I think.
> > Might
> > > > be on the server CD), you'll see that for the Filemaker_Record class
> > there
> > > > is a method called getRecordId(). From the reference (slightly
> > rearranged):
> > > >
> > > > getRecordId (line 183)
> > > > integer getRecordId ()
> > > > Returns the record ID of this object.
> > > >
> > > > return: Record ID.
> > > >
> > > > A record instance is of course what you get when looping through the
> > > > records from a result you got from a query to the database.
> > > >
> > > > -|
> > > >
> > > >
> > > > 3 apr 2008 kl. 00.12 skrev Jonathan Schwartz:
> > > >
> > > >
> > > >
> > > > > Hi Folks,
> > > > >
> > > > > I'm helping a colleague with their first PHP project, but they are
> > using
> > > > >
> > > > the FMP API.
> > > >
> > > > >
> > > > > I can't make heads or tails of the API interface.
> > > > >
> > > > > Can someone clue me in how to grab the recid after creating a
> record?
> > I
> > > > >
> > > > need it to edit the record later in the session.
> > > >
> > > > >
> > > > > The existing code for creating the record looks like this:
> > > > >
> > > > >
> > > > > if(!isset($_SESSION['recordcreated']))
> > > > > {
> > > > > $add_result_add =
> > > > >
> > > > $customer->newAddCommand('CU_Web_Customer');
> > > >
> > > > > $add_result_fields =
> > > > >
> > > >
> >
> array('Shipping_Contact_First_Name'=>$_POST['Shipping_Contact_First_Name'],'
> Shipping_Contact_Last_Name'=>$_POST['Shipping_Contact_Last_Name'],'Login_Nam
> e'=>$_POST['Login_Name'],'Password'=>$_POST['Password'],'Promotion_Code'=>$_
> POST['Promotion_Code'],'Shipping_Email'=>$_POST['Shipping_Email'],);
> > > >
> > > > > foreach($add_result_fields as $key=>$value) {
> > > > > $add_result_add->setField($key,$value);
> > > > > }
> > > > >
> > > > > $add_result_result = $add_result_add->execute();
> > > > >
> > > > > if(FileMaker::isError($add_result_result))
> > > > >
> > > > fmsTrapError($add_result_result,"error.php");
> > > >
> > > > >
> > > > > $add_result_row =
> > > > >
> > > > current($add_result_result->getRecords());
> > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Thanks.
> > > > >
> > > > > Jonathan
> > > > > --
> > > > > Jonathan Schwartz
> > > > > Exit 445 Group
> > > > > jonathan at exit445.com
> > > > > http://www.exit445.com
> > > > > 415-381-1852
> > > > > _______________________________________________
> > > > > 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
> > > >
> > > >
> > > _______________________________________________
> > > 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
> >
> _______________________________________________
> 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