[FX.php List] fmdelete returns a 1
William Downs
william.downs at gmail.com
Mon Oct 26 11:48:03 MDT 2009
Chris,
many thanks indeed
This is more than perfect
Kindest Regards
William
On Mon, Oct 26, 2009 at 5:28 PM, Chris Hansen <chris at iviking.org> wrote:
> William,
>
> Something like this:
>
> if( FX::isError( $medLangResult ) ) {
> echo "system error - please inform admin etc";
> } elseif ($medLangResult->lastErrorCode != 0) {
> echo "error - please inform admin etc";
> } else {
> // do non-error items
> }
>
> Basically, there are two types of potential errors: a serious system error
> (e.g. FileMaker is down, eek!), or a FileMaker error (e.g. improper
> permissions, record locked, etc.) Both types need to be trapped. Make
> sense?
>
> --Chris
>
> On Oct 22, 2009, at 6:23 PM, william.downs wrote:
>
>> Chris, Tim, Dale
>>
>> many sincere thanks - all a great help.
>>
>> Chris - I get the bit about the error object - but the second part eludes
>> me :
>>
>> This is correct so far -
>>
>> $medLang=new FX($serverIP,$webCompanionPort,'FMPro7');
>> $medLang->SetDBData($fmFile,'medLangs');
>> $medLang->SetDBPassword($webPassword,$webUser);
>> $medLang->AddDBParam('-recid',$recid);
>>
>> $medLangResult=$medLang->FMDelete();
>>
>> if( FX::isError( $medLangResult ) ) {
>> echo "error - please inform admin etc";
>> }
>>
>> So what would I do with $medLangResult->lastErrorCode ?
>>
>> I will actually speak to the client about your point below Webko - I like
>> the idea.
>>
>> Kindest Regards
>>
>> William
>>
>> On 22 Oct 2009, at 21:40, Tim 'Webko' Booth wrote:
>>
>>>
>>> On 23/10/2009, at 1:06 AM, william.downs wrote:
>>>
>>>> Hi there,
>>>>
>>>> after a stint with the fm API, I am back to FX.php :-)
>>>>
>>>> Using fmdelete to delete a record - which works fine (does delete the
>>>> record) - but
>>>
>>> As a side-note to the other answers - I don't allow a delete to be run
>>> from the web. All 'deleted' records are flagged as not to show in searches,
>>> and then checked by an admin later through FM. Learnt that people will
>>> always delete something they don't mean to...
>>>
>>> Cheers
>>>
>>> Webko
>>>
>> _______________________________________________
>> 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
>
--
William Downs
Development and Support
BD Databases Ltd
More information about the FX.php_List
mailing list