[FX.php List] How to get recid of new record

John Funk jfunk at criticalsolution.com
Mon Jun 29 22:39:58 MDT 2009


I have this code below that creates a record in FM.
How to I get the record id of the record just created?

$request = new FX($ServerIP, $port, 'FMPro7');
$request->SetDBData($db, 'web_requests','1');
$request->SetDBUserPass($fmAccount, $fmPass);
$request->AddDBParam('AccountNumber', $AccountNumber);
$request->AddDBParam('ContactName', $ContactName);
$request->AddDBParam('Phone', $Phone);
$request->AddDBParam('Email', $Email);
$result = $request->FMNew();
$records = $result['data'];

// this part  below does not work
foreach($records as $record)
{
$RequestRecID=$record['a_ID'][0];  // a_ID is the calculated field to get
the recid
echo $RequestRecID;
}

Thanks in advance.
John

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20090629/bcdf0bf6/attachment.html


More information about the FX.php_List mailing list