[FX.php List] Re: FMDelete returns: 1

Gjermund Gusland Thorsen ggt667 at gmail.com
Sun Mar 20 15:22:55 MDT 2011


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?
>


More information about the FX.php_List mailing list