[FX.php List] Re: FMDelete returns: 1
Gjermund Gusland Thorsen
ggt667 at gmail.com
Sun Mar 20 16:21:50 MDT 2011
Yes, as FMDup() works.
Problem solved
The problem was privs to delete.
ggt
2011/3/20 Dale Bengston <dale.bengston at gmail.com>:
> What's in $_REQUEST['id']? Is it what you think it is?
>
> Dale
>
> On Mar 20, 2011, at 4:22 PM, Gjermund Gusland Thorsen wrote:
>
>> I know this
>> ---
>> This function deletes the record specified by an AddDBParam() call
>> using the special '-recid' parameter documented above. Since a record
>> is being deleted, data is not returned by default. However, should you
>> wish to access URL or error information, simply calling FMDelete() as
>> shown below will return basic query information (i.e. no record data.)
>> $InstanceName->AddDBParam('-recid', $currentRecord);
>> $InstanceName->FMDelete(true);
>> ---
>> but it tells nothing about 1 being sucess or not, obviously it is not
>> as there are still 9 records in the table after running the function,
>> and running
>> ---
>>> $q->AddDBParam( '-recid', $_REQUEST['id'] );
>>> $q->SetDBPassword( $webPW, $webUN );
>>> $r = $q->FMDelete(true);
>>> print_r( $r );
>> ---
>> returns error 101
>>
>> ggt
>>
>> 2011/3/20 Gjermund Gusland Thorsen <ggt667 at gmail.com>:
>>> Here is my query
>>> ---
>>> $q->AddDBParam( '-recid', $_REQUEST['id'] );
>>> $q->SetDBPassword( $webPW, $webUN );
>>> $r = $q->FMDelete();
>>> print_r( $r );
>>> ---
>>> It outputs: 1
>>>
>>> changing the script slightly gives a full response in an arrary
>>> ---
>>> $q->AddDBParam( '-recid', $_REQUEST['id'] );
>>> $q->SetDBPassword( $webPW, $webUN );
>>> $r = $q->FMFindAny();
>>> print_r( $r );
>>> ---
>>> starting off with something like this:
>>> Array
>>> (
>>> [data] => Array
>>> (
>>> [5.0] => Array
>>> (
>>>
>>> What gives?
>>>
>> _______________________________________________
>> 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
>
More information about the FX.php_List
mailing list