[FX.php List] I need a refresher

Steve Winter steve at bluecrocodile.co.nz
Thu Dec 8 16:54:40 MST 2011


Deja vu, or not getting anywhere...?

Cheers
Steve


> 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();
> 
> }
> 
> ?>
> 
> 
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20111208/ea32219f/attachment.html


More information about the FX.php_List mailing list