[FX.php List] I need a refresher

John Funk jfunk at criticalsolution.com
Thu Dec 8 12:21:09 MST 2011


Hi,
I am a bit rusty at PHP and FX....I have some code below that I need to
figure out why I keep getting an error 507 error.
The script works ³getting² the three FileMaker records that match the $Item
string.
I just cannot figure out why it will not edit the record with the $RecID
Thanks for any help.
John Funk

<?php
require_once ('FX/FX.php');
require_once ('FX/server_data.php');
define('DEBUG', True);

//Get Item Info from URL
$Item=$_REQUEST['Item'];
$Date=$_REQUEST['Date'];

//echo "Item=".$Item.'<br>';
//echo "Date=".$Date.'<br>';
//exit;

//GETTING THE ARRAY OF RECORDS WORKS
$groupSize='10';
$request = new FX($ServerIP, $Port, $DataSourceType);
$request->SetDBData($fmdb,'XML_Items',$groupSize);
$request->SetDBUserPass($fmAccount, $fmPass);
$request->AddDBParam('ItemNumber_Prism', "=".$Item);
$result =$request->FMFind();
$records =$result['data'];

foreach($records as $record)
{
$RecID=$record['recid'][0];
$TCIN=$record['ItemNumber_Prism'][0];
$ASIN=$record['ASIN_Prism'][0];
$ImageUploadedDate=$record['ImageUploadedDate'][0];
$Notes=$record['Notes'][0];

//EDITING THE EACH RECORD DOES NOT WORK
$request = new FX($ServerIP, $Port, $DataSourceType);
$request->SetDBData($fmdb,'XML_Items',1);
$request->SetDBUserPass($fmAccount, $fmPass);
$request->AddDBParam('-recid', $RecID);
$request->AddDBParam('Notes', ŒTEST¹);   //FAILS HERE with 507
$result = $request->FMEdit();

}

?>




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


More information about the FX.php_List mailing list