[FX.php List] [OFF] API Equivalent for Grabbing RECID
Jonathan Schwartz
jschwartz at exit445.com
Wed Apr 2 16:12:59 MDT 2008
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_Name'=>$_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
More information about the FX.php_List
mailing list