[FX.php List] delete multiple records at once
Andy Gaunt
andy at fmpug.com
Sat May 13 19:33:28 MDT 2006
Timothy,
What you are looking to do is loop through and delete a set of entries in
the database.
To do a delete you have already found you ned the -recid.
The easiest way to accomplish this is to present the user with a form and
checkboxes to tag those entries to delete. The checkbox value should be the
-recid for each record.
Then on your processing page, simply do a foreach loop of the posted values
(as they are the individual rec id's) and inside the loop use the function
you already provided to delete a set of records.
Let me know if you need help with the code.
Andy Gaunt
T: 407.810.4722
andy at fmpug.com
http://www.fmpug.com <http://www.fmpug.com/>
Recipient of FileMaker's 2005 "Mad Dog" Public Relations Award
For chapter locations, dates & times please visit the website at
http://www.fmpug.com <http://www.fmpug.com/> If you can make it to a
meeting, please RSVP at http://www.fmpug.com/rsvp.php
_____
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Timothy Tait
Sent: Saturday, May 13, 2006 9:04 PM
To: FX.php_List at mail.iviking.org
Subject: [FX.php List] delete multiple records at once
hi there.
i am using fx.php to connect to a filmaker7 db. i have a collection page on
my website, that consists of multiple records per user. i have allowed
users to remove a single entry from the collection, and would like the
ability for them to delete all the entries.
is there a way in fx.php that i can do this?
i have tried
$delete=new FX($serverIP, $webCompanionPort, 'FMPro7');
$delete->SetDBData($dbName, $tableName);
$delete->SetDBPassword($password, $username);
$delete->AddDBParam('fk_CustomerID', $custID);
$deleteResult=$delete->FMDelete(true);
to no effect.
any ideas?
thanks,
-timothy
--
give a man a fire, and keep him warm for a day.
set a man on fire, and keep him warm for the rest of his life.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20060513/22634261/attachment-0001.html
More information about the FX.php_List
mailing list