[FX.php List] I need a refresher
John Funk
csinfo at criticalsolution.com
Thu Dec 8 22:40:50 MST 2011
Hey guys thanks for your brain power on this. Tomorrow I will try switching
PW & UN. I have never had trouble in the past with this.
But I did just think of a possible issue with the FM table I am using.
The table is in a solution that uses SyncDek to sync data to India and
SyncDek requires a special field for a primary key and I wonder if that
calculated field is preventing editing from XML. (The FileMaker client
requires a plugin to be present for data entry)
I will switch tables and test the exact script, I bet it will work.
Thanks again,
John
On 12/8/11 9:55 PM, "Bob Patin" <bob at patin.com> wrote:
> That *is* interesting; somewhere in the past I had username & pw backwards and
> it just didn't do anything at all... but I don't remember what the error
> message was. In fact, as I think of it, I don't think it returned any error
> code...
>
>
> Bob Patin
> Longterm Solutions LLC
> P.O. Box 3408
> Brentwood, TN 37024
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> iChat: bobpatin
> AIM: longterm1954
> Twitter: bobpatin
> Google+: http://www.longtermsolutions.com/plus
> --
> FileMaker 9, 10 & 11 Certified Developer
> Member of FileMaker Business Alliance and FileMaker TechNet
> --
> FileMaker hosting and consulting for all versions of FileMaker
> PHP Full email services Free DNS hosting Colocation Consulting
> On Dec 8, 2011, at 9:27 PM, Jonathan Schwartz wrote:
>
>> Agreed...so how is the Find query getting results using the same flawed
>> parameter setting?
>>
>> Jonathan Schwartz
>> Exit 445 Group
>> 415-370-5011
>>
>> On Dec 8, 2011, at 16:37, Bob Patin <bob at patin.com> wrote:
>>
>>> Jonathan's exactly right; password first, then username.
>>>
>>>
>>> Bob Patin
>>> Longterm Solutions LLC
>>> <mailto:bob at longtermsolutions.com> bob at longtermsolutions.com
>>> 615-333-6858
>>> <http://www.longtermsolutions.com/> http://www.longtermsolutions.com
>>> <http://www.longtermsolutions.com/>
>>> FileMaker 9, 10 & 11 Certified Developer
>>> Member of FileMaker Business Alliance and FileMaker TechNet
>>> --
>>> Twitter: bobpatin
>>> Google+: <http://www.longtermsolutions.com/plus>
>>> http://www.longtermsolutions.com/plus
>>> AIM: longterm1954
>>> iChat: bobpatin
>>> --
>>> Expert FileMaker Consulting
>>> FileMaker Hosting for all versions of FileMaker
>>>
>>> On Dec 8, 2011, at 6:01 PM, Jonathan Schwartz wrote:
>>>
>>>> John,
>>>>
>>>> Two suggestions:
>>>>
>>>> 1) check the order of parameters for SetDBUserPass. Doesn't the Pass come
>>>> first?
>>>>
>>>> 2) Reduce the problem query to just an edit request on a single record.
>>>> Hardcore the recid. At least you will know that you are dealing with a
>>>> single issue, rather than one involving a query and edit of multiple
>>>> records on a loop.
>>>>
>>>> Try that and see where you get.
>>>>
>>>> Jonathan Schwartz
>>>> Exit 445 Group
>>>> 415-370-5011
>>>>
>>>> On Dec 8, 2011, at 11:21, John Funk < <mailto:jfunk at criticalsolution.com>
>>>> jfunk at criticalsolution.com> wrote:
>>>>
>>>>> 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
>>>>> <mailto:FX.php_List at mail.iviking.org> FX.php_List at mail.iviking.org
>>>>> <http://www.iviking.org/mailman/listinfo/fx.php_list>
>>>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>> _______________________________________________
>>>> FX.php_List mailing list
>>>> <mailto:FX.php_List at mail.iviking.org> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20111208/22533d21/attachment-0001.html
More information about the FX.php_List
mailing list